-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
100 lines (100 loc) · 2.82 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
# Apply to all files without committing:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
default_language_version:
# Use latest LTS release
node: 20.14.0
exclude: ^paper/(acl_natbib\.bst|anthology\.bib|nlpaics2024\.sty)|rcqa_data/.*$
repos:
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-submodules
- id: mixed-line-ending
args: [--fix=lf]
- id: name-tests-test
args: [--unittest]
- id: no-commit-to-branch
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/sirosen/texthooks
rev: 0.6.6
hooks:
- id: alphabetize-codeowners
- id: fix-ligatures
- id: fix-smartquotes
- id: fix-spaces
- id: forbid-bidi-controls
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
exclude: ^src/run_clm\.py$
- id: black
files: ^src/run_clm\.py$
args: [--line-length=119]
- repo: https://github.com/rbubley/mirrors-prettier # Use maintained fork of official mirror
rev: v3.3.2
hooks:
- id: prettier
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt
args: [
--write,
--indent=2,
--case-indent, # Switch cases will be indented.
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
# `tomllib` was added to stdlib in Python 3.11
- tomli==2.0.1 ; python_version < "3.11"