This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
121 lines (112 loc) · 3.52 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
121
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# yamllint disable rule:line-length
# Initially copied from https://github.com/davidsneighbour/kollitsch.dev/blob/main/.pre-commit-config.yaml
# cspell:ignore reforme
# yamllint enable
fail_fast: true
minimum_pre_commit_version: 2.18.1
# yamllint disable rule:key-ordering
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.4.0
hooks:
- id: check-added-large-files
# - Prevent giant files from being committed.
- id: check-case-conflict
# - checks for files that would conflict in
# case-insensitive filesystems.
# - id: check-executables-have-shebangs
# ensures that (non-binary) executables have a shebang.
# - id: check-shebang-scripts-are-executable
# ensures that (non-binary) files with a shebang are executable.
- id: check-merge-conflict
# - checks for files that contain merge conflict strings.
- id: check-symlinks
# - checks for symlinks which do not point to anything.
- id: check-vcs-permalinks
# - ensures that links to vcs websites are permalinks.
- id: destroyed-symlinks
# - detects symlinks which are changed to regular
# files with a content of a path which that symlink was pointing to.
- id: check-toml
# checks toml files for parsable syntax.
- id: detect-private-key
# - detects the presence of private keys.
- id: file-contents-sorter
files: ^(tests/config/words-.*.txt$)
args: [--unique]
- id: fix-byte-order-marker
# - removes utf-8 byte order marker
- id: forbid-new-submodules
# - prevents addition of new git submodules.
- id: mixed-line-ending
# replaces or checks mixed line ending.
- id: no-commit-to-branch # - don't commit to branch
args:
- --branch
- main
- --branch
- "v[0-9].[0-9]" # yamllint disable-line
- id: pretty-format-json
# - Checks that all your JSON files are pretty. "Pretty"
# here means that keys are sorted and indented.
args: [--autofix, --indent, " "]
- id: trailing-whitespace
exclude: ^(_vendor)
args: [--markdown-linebreak-ext=md]
- repo: "https://github.com/igorshubovych/markdownlint-cli"
rev: v0.36.0
hooks:
- id: markdownlint
args: [--config, tests/config/markdownlint.json]
files: .+\.(md|markdown)$
- repo: "https://github.com/adrienverge/yamllint"
rev: v1.32.0
hooks:
- id: yamllint
args: [-c=./tests/config/yamllint.yaml]
exclude: ^(_vendor|.*/vault.yml$)
- repo: "https://github.com/zricethezav/gitleaks"
rev: v8.18.0
hooks:
- id: gitleaks
args: [-c, ./tests/config/gitleaks.toml]
- repo: "https://github.com/jorisroovers/gitlint"
rev: v0.19.1
hooks:
- id: gitlint
- repo: "https://github.com/editorconfig-checker/editorconfig-checker.python"
rev: 2.7.2
hooks:
- id: editorconfig-checker
alias: ec
args:
- -no-color
exclude: ^(LICENSE|.*/master.cf(.jinja)?$)
# - repo: "https://github.com/shellcheck-py/shellcheck-py"
# rev: v0.8.0.4
# hooks:
# - id: shellcheck
# - repo: "https://github.com/scop/pre-commit-shfmt"
# rev: v3.5.1-1
# hooks:
# - id: shfmt
- repo: "https://github.com/streetsidesoftware/cspell-cli"
rev: v7.3.0
hooks:
- id: cspell
args:
- --config
- tests/config/cspell.json
- --gitignore
- --gitignore-root
- --no-cache
- --no-must-find-files
- --show-context
- --show-suggestions
- --validate-directives
exclude: ^(LICENSE|tests/config/cspell.json|\.gitlab-ci\.yml|README.md$) # yamllint disable-line
# yamllint enable rule:key-ordering
...