-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
130 lines (118 loc) · 3.43 KB
/
.pre-commit-config.yaml
File metadata and controls
130 lines (118 loc) · 3.43 KB
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
130
---
# Install pre-commit hooks via
# pre-commit install
ci:
autofix_prs: true
autoupdate_schedule: 'quarterly'
autoupdate_commit_msg: 'chore: pre-commit autoupdate\\n\\nAutomatically generated by pre-commit.ci'
skip: ['build-docs', 'mypy']
submodules: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude_types: [svg]
exclude: |
(?x)^(
CHANGELOG |
docs/source/generated |
docs/source/fr_metrics/generated |
docs/source/nr_metrics/generated
)
- id: end-of-file-fixer
exclude_types: [svg]
exclude: |
(?x)^(
CHANGELOG |
docs/source/generated |
docs/source/fr_metrics/generated |
docs/source/nr_metrics/generated
)
- id: debug-statements
- id: check-ast
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: check-yaml
exclude: conda/recipe/meta.yaml
args: [--allow-multiple-documents, --unsafe]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.10
hooks:
# Run the linter.
- id: ruff
args: [--config=pyproject.toml]
# Run the formatter.
- id: ruff-format
args: [--config=pyproject.toml]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
hooks:
- id: validate-pyproject
name: Validate pyproject.toml
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
additional_dependencies:
- sphinx>=1.8.1
- repo: https://github.com/thclark/pre-commit-sphinx
rev: 0.0.3
hooks:
- id: build-docs
additional_dependencies:
- viqa[docs]
- sphinxcontrib-email
args: ['--cache-dir', 'docs/build/doctrees', '--html-dir', 'docs/build/html', '--source-dir', 'docs/source']
language_version: python3
stages: [pre-push]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
hooks:
- id: yamllint
args: ["--strict", "--config-file=.yamllint.yaml"]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
files: ^.*\.(py|c|cpp|h|m|md|rst|yml|yaml)$
exclude: |
(?x)^(
CHANGELOG |
CODE_OF_CONDUCT
)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies:
- viqa[lint]
args: ["--config-file=pyproject.toml", "src/viqa"]
files: src/viqa # Only run when files in src/viqa are changed.
pass_filenames: false
- repo: https://github.com/citation-file-format/cffconvert
rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c
hooks:
- id: validate-cff
files: ^CITATION.cff$
- repo: local
hooks:
- id: generate_requirements
name: Generate requirements
entry: python tools/generate_requirements.py
language: system
stages: [pre-commit]