-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
86 lines (77 loc) · 2.25 KB
/
.pre-commit-config.yaml
File metadata and controls
86 lines (77 loc) · 2.25 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
---
# Install pre-commit hooks with:
# uv run prek install
# Update hooks:
# uv run prek auto-update
exclude: "scripts/*|tmp/*"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
# Out-of-the-box hooks for pre-commit.
rev: v6.0.0
hooks:
# Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer
# Replaces or checks mixed line ending.
- id: mixed-line-ending
# Trims trailing whitespace.
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# Attempts to load all json files to verify syntax.
- id: check-json
# Attempts to load all yaml files to verify syntax.
- id: check-yaml
# Attempts to load all TOML files to verify syntax.
- id: check-toml
# Prevent giant files from being committed.
- id: check-added-large-files
# Set max file size to 500 KB.
args: ["--maxkb=500"]
- repo: https://github.com/asottile/pyupgrade
# Automatically upgrade syntax for newer versions of the Python language.
rev: v3.21.2
hooks:
- id: pyupgrade
- repo: https://github.com/astral-sh/ruff-pre-commit
# Linter and formatter for Python code.
rev: v0.15.1
hooks:
# Run the linter.
# Automatically fix issues where possible.
- id: ruff-check
types: [python]
args: [--fix]
# Run the formatter.
- id: ruff-format
types: [python]
- repo: https://github.com/PyCQA/bandit
# Security linter for Python code.
rev: 1.9.3
hooks:
- id: bandit
args: ["--exclude", "tests"]
- repo: https://github.com/crate-ci/typos
# Source code spell checker
rev: v1.43.4
hooks:
- id: typos
- repo: https://github.com/owenlamont/uv-secure
# Scan your uv.lock file for dependencies with known vulnerabilities
rev: 0.15.4
hooks:
- id: uv-secure
# YAML
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
# Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.0
hooks:
- id: markdownlint
args: ['--fix']
# Shell
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck