forked from OpenLineage/OpenLineage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
95 lines (95 loc) · 3.31 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: insert-license
name: Add license for all Python files
files: \.py$|\.pyi$
args:
- --comment-style
- "#"
- --license-filepath
- .pre_commit/license-python.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: Add license for all Java files
files: \.java$
args:
- --comment-style
- ""
- --license-filepath
- .pre_commit/license-java.txt
- --fuzzy-match-generates-todo
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
files: ^client/python/
- id: check-builtin-literals
files: ^client/python/
- id: check-merge-conflict
files: ^client/python/
- id: check-toml
files: ^client/python/
- id: debug-statements
files: ^client/python/
- id: end-of-file-fixer
files: ^client/python/
- id: trailing-whitespace
files: ^client/python/
exclude: ^.*\.cfg$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
name: ruff-lint
args: [--fix]
files: ^client/python/|^dev/|^integration/airflow/|^integration/common/|^integration/dagster/|^integration/dbt/|^integration/spark/|^integration/sql/
- id: ruff-format
name: ruff-format
files: ^client/python/|^dev/|^integration/airflow/|^integration/common/|^integration/dagster/|^integration/dbt/|^integration/spark/|^integration/sql/
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: insert-license
files: ^client/python/.*\.py$
args:
- --detect-license-in-X-top-lines=2
- --license-filepath
- LICENSE.insert.txt
- --use-current-year
- --no-extra-eol
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
- id: prettier
files: ^spec/
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
name: Run codespell to check for common misspellings in files
entry: bash -c 'echo "If you think that this failure is an error, consider adding the word(s)
to the codespell dictionary at spelling_wordlist.txt.
The word(s) should be in lowercase." && exec codespell "$@"' --
language: python
types: [text]
args:
- --ignore-words=spelling_wordlist.txt
- --skip=*.js,*.svg,*.xml,*/**/test/*,*/**/tests/*
- repo: local
hooks:
- id: check_schemas
name: Check JSON Schema spec files.
language: golang
additional_dependencies: ["github.com/santhosh-tekuri/jsonschema/cmd/jv@latest"]
entry: ./.pre_commit/json-schema/check-spec.sh
files: ^spec/.*\.json$
exclude: ^spec/tests/.*$
- id: test_events
name: Test events against JSON Schema spec files.
language: golang
additional_dependencies: ["github.com/santhosh-tekuri/jsonschema/cmd/jv@latest"]
entry: ./.pre_commit/json-schema/test-facets.sh
files: ^spec/facets/.*\.json$