-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
151 lines (151 loc) · 4.27 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
# SPDX-FileCopyrightText: 2024 Cognitive Disorders Research Lab
#
# SPDX-License-Identifier: CC0-1.0
repos:
- repo: local
hooks:
- id: fmt
name: Rust format
entry: cargo +nightly fmt --all
language: system
types: [rust]
files: \.rs$
pass_filenames: false
- id: clippy
name: Run clippy linter
entry: cargo +nightly clippy --all-targets --all-features -- -D warnings
language: system
types: [rust]
files: \.rs$
pass_filenames: false
- id: cargo-check
name: Run cargo check
entry: cargo +nightly check --all-targets --all-features
language: system
types: [rust]
files: \.rs$
pass_filenames: false
- id: cargo-about-json
name: Generate list of licenses in JSON
entry: scripts/generate_about_json.sh
language: script
types_or: [file, rust]
files: "Cargo.toml$"
pass_filenames: false
- id: cargo-about-md
name: Generate list of licenses in Markdown
entry: scripts/generate_about_md.sh meta/licenses.hbs
language: script
types_or: [file, rust]
files: "Cargo.toml$"
pass_filenames: false
- id: cargo-toml-lint
name: Check Cargo.toml
entry: cargo-toml-lint
language: system
types_or: [file, rust]
files: "Cargo.toml$"
pass_filenames: true
- id: vale-lint
name: Run Vale linter
entry: vale
language: system
types: [markdown]
files: "^(README.md|CONTRIBUTING.md|CODE_OF_CONDUCT.md|guide/src/.*.md)$"
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.15.0
hooks:
- id: commitizen
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
exclude: ".vscode/.*json"
- id: check-merge-conflict
- id: no-commit-to-branch
args:
- --branch
- main
- --branch
- next
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
exclude: ".*licenses.*\\.(md|hbs)"
- id: mixed-line-ending
args:
- --fix=no
- id: pretty-format-json
exclude: ".vscode/.*json"
args:
- --indent=4
- --autofix
- --no-ensure-ascii
- id: trailing-whitespace
exclude: "licenses_report.md"
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.1.0
hooks:
- args:
- build
- chore
- ci
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
- bump
id: conventional-pre-commit
stages:
- commit-msg
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs
- repo: https://github.com/google/yamlfmt
rev: v0.11.0
hooks:
- id: yamlfmt
exclude: ".github/workflows/.*\\.ya?ml"
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args:
- --ignore
- CHANGELOG.md
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args:
- "--baseline"
- ".secrets.baseline"
exclude: "meta/licenses.*"
- repo: https://github.com/sirosen/texthooks
rev: 0.6.4
hooks:
- id: fix-smartquotes
exclude: "licenses_report.json"
- id: fix-ligatures
- id: forbid-bidi-controls
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.1
hooks:
- id: reuse