-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
100 lines (86 loc) · 2.5 KB
/
.pre-commit-config.yaml
File metadata and controls
100 lines (86 loc) · 2.5 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
---
default_install_hook_types: ['pre-commit', 'commit-msg']
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# File size checks
- id: check-added-large-files
args: [--maxkb=500]
# Syntax checks
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-toml
# Whitespace and formatting
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
exclude: '.config/nvim/lazy-lock.json'
# Script and executable checks
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: destroyed-symlinks
# Security leak detection
- id: detect-private-key
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
args: [-c, .config/yamllint/config]
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v2.3.1
hooks:
- id: stylua-github
args: [--config-path, .config/nvim/stylua.toml]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: '.config/nvim/lazy-lock.json'
args:
[
--print-width=80,
--tab-width=2,
--single-quote=true,
--trailing-comma=es5,
]
- repo: https://github.com/crate-ci/typos
rev: v1
hooks:
- id: typos
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
exclude: '.config/nvim/lazy-lock.json'
- repo: https://github.com/zricethezav/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
args: [--verbose, --report-format=json]
- repo: https://github.com/sirwart/ripsecrets
rev: v0.1.11
hooks:
- id: ripsecrets
# Language-specific linters that respect editorconfig
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
hooks:
- id: flake8
args: [--max-line-length=88, --extend-ignore=E203, W503]
exclude: ^(bin/|zsh/|config/)
- repo: https://github.com/psf/black
rev: 26.1.0
hooks:
- id: black
args: [--line-length=88]
exclude: ^(bin/|zsh/|config/)
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
args: [--severity=warning, --exclude=SC2207, --exclude=SC2034]