-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
39 lines (31 loc) · 1.43 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
default_stages: [ commit, push ]
fail_fast: true # stop running hooks at the first failure
minimum_pre_commit_version: 2.15.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
# Verify syntax
- id: check-yaml
- id: check-json
- id: check-xml
# Checkers
- id: check-merge-conflict # check for merge conflict string
- id: detect-private-key # check for existence of private keys
# Implicit minor corrections to files
- id: end-of-file-fixer # ensure all files end with a new line
- id: trailing-whitespace # trim trailing whitespaces
# Good practices for executables/scripts
- id: check-executables-have-shebangs # non-binary executables have shebang
- id: check-shebang-scripts-are-executable # verify shebang scripts are executable
# Pretty format JSON files implicitly
- id: pretty-format-json
args: ['--autofix']
# Debatable -- for most projects adding files larger than 10 MB is likely to be
# a mistake instead of a requirement. Remove this if needed
- id: check-added-large-files # fails if a file larger than 10 MB exists
args: ['--maxkb=10240', '--enforce-all']
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5
hooks:
- id: git-check # check for git conflict markers and whitespace errors - uses git internally