-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
120 lines (120 loc) · 3.26 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
minimum_pre_commit_version: 2.20.0
fail_fast: false
default_stages:
- commit
exclude: (.idea|vscode)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
exclude: (ai21_tokenizer/resources|tests/resources)
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: no-commit-to-branch
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
exclude: (CHANGELOG.md)
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: forbid-binary
exclude: (ai21_tokenizer/resources|tests/resources)
- id: git-check
files: "CHANGELOG.md"
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.5.3
hooks:
- id: commitizen
name: Lint commit message
stages:
- commit-msg
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
hooks:
- id: check-jsonschema
name: Validate Pre-commit
files: .*\.pre-commit-config\.yaml
types:
- yaml
args:
- --schemafile
- https://json.schemastore.org/pre-commit-config.json
- id: check-jsonschema
name: Validate YamlLint configuration
files: .*\.yamllint\.yaml
types:
- yaml
args:
- --schemafile
- https://json.schemastore.org/yamllint.json
- id: check-jsonschema
name: Validate Prettier configuration
files: .*\.prettierrc\.yaml
types:
- yaml
args:
- --schemafile
- http://json.schemastore.org/prettierrc
- repo: https://github.com/python-poetry/poetry
rev: 1.5.0
hooks:
- id: poetry-check
- repo: https://github.com/adrienverge/yamllint
rev: v1.32.0
hooks:
- id: yamllint
name: Lint YAML files
args:
- --format
- parsable
- --strict
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
name: Check sh files (and patch)
entry: bash -eo pipefail -c 'shellcheck $@ -f diff | patch -p 1' --
- id: shellcheck
name: Check sh files (and print violations)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- id: prettier
name: Formatter
exclude: (CHANGELOG.md)
additional_dependencies:
types_or:
- yaml
- markdown
- shell
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
types:
- python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: ruff
args:
- --fix
- repo: local
hooks:
- id: hadolint
name: Lint Dockerfiles
language: docker_image
entry: hadolint/hadolint:v2.10.0 hadolint
types:
- dockerfile