mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-05 12:07:10 +00:00
parent
dee7cd7717
commit
34a9d31240
31
.pre-commit-config.yaml
Normal file
31
.pre-commit-config.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 21.12b0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.8
|
||||
exclude: ingestion/src/metadata/generated
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.3
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black"]
|
||||
exclude: ingestion/src/metadata/generated
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: google-style-java
|
||||
name: Google Java Code Style for Java
|
||||
description: Formats code in Google's Java codestyle with 120 line length.
|
||||
entry: scripts/format-code.sh
|
||||
language: script
|
||||
files: \.java$
|
||||
require_serial: true
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: lint-staged
|
||||
name: lint-staged
|
||||
description: Formats TS and JS code.
|
||||
entry: scripts/lint-staged.sh
|
||||
language: script
|
||||
files: \.(js|jsx|ts|tsx)$
|
||||
require_serial: true
|
||||
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ install_dev:
|
||||
precommit_install:
|
||||
@echo "Installing pre-commit hooks"
|
||||
@echo "Make sure to first run `make install_test`"
|
||||
pre-commit install --config ingestion/.pre-commit-config.yaml
|
||||
pre-commit install
|
||||
|
||||
isort:
|
||||
isort $(PY_SOURCE) --skip $(PY_SOURCE)/metadata/generated --profile black --multi-line 3
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: stable
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.8
|
||||
exclude: ingestion/src/metadata/generated
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.3
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--profile", "black"]
|
||||
exclude: ingestion/src/metadata/generated
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged --concurrent false"
|
||||
}
|
||||
}
|
||||
@ -140,7 +140,6 @@
|
||||
"file-loader": "4.3.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.0.8",
|
||||
"html-webpack-plugin": "^4.5.1",
|
||||
"husky": "^4.3.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest-environment-jsdom-fourteen": "^1.0.1",
|
||||
"lint-staged": "^10.3.0",
|
||||
|
||||
3
scripts/format-code.sh
Executable file
3
scripts/format-code.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
mvn googleformatter:format@reformat-sources
|
||||
4
scripts/lint-staged.sh
Executable file
4
scripts/lint-staged.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
cd openmetadata-ui/src/main/resources/ui
|
||||
npx lint-staged --concurrent false
|
||||
Loading…
x
Reference in New Issue
Block a user