forked from meltano/meltano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
111 lines (102 loc) · 3.71 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.ci hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_commit_msg: "chore: pre-commit autoupdate"
autoupdate_schedule: weekly
repos:
- repo: local
hooks:
- id: check-poetry-lock
# `pre-commit autoupdate` will update to older Poetry versions, so we
# use a local hook to avoid that bug:
# https://github.com/meltano/meltano/pull/7238#issuecomment-1409434351
name: check that `poetry.lock` conforms to `pyproject.toml`
entry: sh -c 'find . -type f -name poetry.lock -print0 | xargs -0 -n 1 -P 0 sh -c 'cd "$(dirname "$1")" && echo "$(pwd)/poetry.lock" && poetry lock --check' _ {} \;'
language: python
pass_filenames: false
additional_dependencies:
- "poetry==1.6.1"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: ^src/meltano/core/cli_messages\.py$
- id: end-of-file-fixer
exclude: ^.*/plugins/.*/.*\.lock$
- id: check-yaml
- id: check-json
- id: pretty-format-json
args: ["--autofix", "--indent=2", "--no-sort-keys"]
- id: check-added-large-files
- id: check-merge-conflict
- id: check-toml
- id: debug-statements
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.26.3
hooks:
- id: check-metaschema
name: validate JSON schemas against meta schemas
files: ^schemas?/.*\.json$
- id: check-jsonschema
name: validate 'meltano.yml' with jsonschema
files: .*/meltano.yml$
args: ["--schemafile", "src/meltano/schemas/meltano.schema.json"]
- id: check-jsonschema
name: validate 'discovery.yml' with jsonschema
files: ^src/meltano/core/bundle/discovery.yml$
args: ["--schemafile", "src/meltano/schemas/discovery.schema.json"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
name: shellcheck
exclude: ^integration/mdsh$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.48.0 # Keep this in sync with the eslint "additional_dependency" below!
hooks:
- id: eslint
files: \.[jt]sx?$
args: ['--fix', '--config=docs/.eslintrc.json']
additional_dependencies:
- "[email protected]" # Keep this in sync with the rev above!
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.287
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
exclude: ^(src/meltano/migrations/)
- repo: https://github.com/flakeheaven/flakeheaven
rev: 3.3.0
hooks:
- id: flakeheaven
exclude: ^(src/meltano/migrations/)
args:
- "--max-local-variables=8"
additional_dependencies:
- flake8==4.0.1
- flake8-bandit==3.0.0
- flake8-broken-line==0.4.0
- flake8-bugbear==22.12.6
- flake8-commas==2.1.0
- flake8-comprehensions==3.10.1
- flake8-debugger==4.1.2
- flake8-docstrings==1.6.0
- flake8-eradicate==1.4.0
- flake8-polyfill==1.0.2
- flake8-quotes==3.3.1
- flake8-rst-docstrings==0.2.7
- flake8-string-format==0.3.0
- flake8-typing-as-t==0.0.3
- pep8-naming==0.12.1
- wemake-python-styleguide==0.16.1