-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
129 lines (114 loc) · 3.05 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: no-commit-to-branch
args: [--branch, main, --branch, master]
- id: check-ast
- id: check-docstring-first
- id: check-case-conflict
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
files: ^metadata_backend
- id: pretty-format-json
files: ^metadata_backend
args:
- --autofix
- --indent=4
- --no-ensure-ascii
- --no-sort-keys
- id: check-yaml
- id: check-xml
exclude: tests/test_files/study/SRP000539_invalid[0-9]?.xml
- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
args: [-l, "120"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black, --filter-files]
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings
- flake8-annotations
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
files: ^metadata_backend
- repo: https://github.com/APIDevTools/swagger-cli
rev: v4.0.4
hooks:
- id: swagger-validation
args: [validate]
files: docs/openapi.yml
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-metaschema
name: Validate schemas
files: ^metadata_backend/helpers/schemas/.*\.json$
- id: check-jsonschema
name: Validate workflows
files: ^metadata_backend/conf/workflows/.*\.json$
args: ["--schemafile", "metadata_backend/helpers/schemas/workflow.json"]
- id: check-dependabot
- id: check-github-workflows
- repo: https://github.com/jendrikseipp/vulture
rev: 'v2.11'
hooks:
- id: vulture
args: [metadata_backend/, whitelist_dead_code.py]
- repo: local
hooks:
- id: sort
name: sort dictionary
entry: ./scripts/dictionary/sort.sh
language: script
files: ^(docs|.*md)
require_serial: true
pass_filenames: false
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
files: ^metadata_backend
args:
[
-rn, # Only display messages
-sn, # Don't display the score
]
- id: pyspelling-docs
name: pyspelling-docs
entry: ./scripts/dictionary/pyspelling.sh
language: script
args: [markdown]
types_or: [markdown, rst]
require_serial: true
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
files: ^metadata_backend
- id: pyspelling-schemas
name: pyspelling-schemas
entry: ./scripts/dictionary/pyspelling.sh
language: script
args: [json-schemas]
files: ^metadata_backend/helpers/schemas/
types: [json]
require_serial: true