-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
52 lines (46 loc) · 1.31 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
ci:
autoupdate_commit_msg: "ci(pre-commit): pre-commit autoupdate"
autofix_commit_msg: "style: pre-commit auto fixes [...]"
autoupdate_schedule: monthly
default_install_hook_types: [pre-commit, commit-msg]
repos:
# Meta hooks
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
# Security & credential scanning/alerting
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
# Lint and format with ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.9
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
# Commitizen
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.1
hooks:
- id: commitizen
additional_dependencies: [ cz-changeup ]
- id: commitizen-branch
additional_dependencies: [ cz-changeup ]
stages: [pre-push]