-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.pre-commit-config.yaml
More file actions
131 lines (121 loc) · 3.31 KB
/
example.pre-commit-config.yaml
File metadata and controls
131 lines (121 loc) · 3.31 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
131
# Example pre-commit hooks for reference
# These hooks are not needed for this dotfiles repository but may be useful for other projects
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Python hooks
- repo: https://github.com/psf/black
rev: 25.9.0
hooks:
- id: black
name: 🐍 Format Python code PEP8
args:
- --line-length=88
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
- id: isort
name: 🐍 Sort Python imports
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
name: 🐍 Upgrade Python code
args: [--py36-plus]
# Jupyter notebook hooks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-black
- id: nbqa-flake8
- id: nbqa-isort
# Dockerfile hooks
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint
args:
# This rule is wrong. See https://github.com/hadolint/hadolint/issues/562
- --ignore=DL3005
- --ignore=DL3009
# LaTeX hooks
- repo: https://github.com/jonasbb/pre-commit-latex-hooks
rev: v1.5.0
hooks:
- id: american-eg-ie
- id: cleveref-capitalization
- id: consistent-spelling
args:
- --emph=et al.
- --emph=a priori
- --emph=a posteriori
- --regex=naive=\bna(i|\\"i)ve'
- id: csquotes
- id: ensure-labels-for-sections
- id: no-space-in-cite
- id: tilde-cite
# Helm hooks
- repo: https://github.com/norwoodj/helm-docs
rev: v1.14.2
hooks:
- id: helm-docs
args:
- --chart-search-root=charts/kotlin
- --chart-search-root=charts/laravel
- --chart-search-root=charts/common
# Go hooks
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet
- id: go-lint
- id: go-imports
- id: go-cyclo
args: [-over=15]
- id: validate-toml
- id: no-go-testing
- id: golangci-lint
- id: go-critic
- id: go-unit-tests
- id: go-build
- id: go-mod-tidy
# GitHub Actions hooks
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
hooks:
- id: yamllint
name: Lint GitHub Action workflow files
files: ^\.github/workflows/
args:
- -d
- >
{
extends: default,
rules: {
document-start:{
present: true,
level: warning
},
line-length: {
max: 88,
level: warning
},
indentation: {
spaces: 2,
indent-sequences: false,
level: warning
}
}
}
- repo: https://github.com/rhysd/actionlint
rev: v1.7.8
hooks:
- id: actionlint
files: .github/workflows
# Commitizen (different from Conventional Commits)
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.9.1
hooks:
- id: commitizen
stages: [commit-msg]