Debian Codegraph @

.pre-commit-config.yaml

raw
1 ci:
2 autofix_commit_msg: "style: pre-commit fixes"
3 autoupdate_commit_msg: "chore: pre-commit fixes"
4 autofix_prs: false
5 autoupdate_schedule: "monthly"
6
7 repos:
8 - repo: https://github.com/pre-commit/pre-commit-hooks
9 rev: v6.0.0
10 hooks:
11 - id: check-added-large-files
12 args: ["--enforce-all", "--maxkb=300"]
13 # Prevent giant files from being committed.
14 - id: check-case-conflict
15 # Check for files with names that would conflict on a case-insensitive
16 # filesystem like MacOS HFS+ or Windows FAT.
17 - id: check-json
18 # Attempts to load all json files to verify syntax.
19 - id: check-merge-conflict
20 # Check for files that contain merge conflict strings.
21 - id: check-symlinks
22 # Checks for symlinks which do not point to anything.
23 - id: check-toml
24 # Attempts to load all TOML files to verify syntax.
25 - id: check-xml
26 # Attempts to load all xml files to verify syntax.
27 - id: check-yaml
28 # Attempts to load all yaml files to verify syntax.
29 exclude: ".*(.github.*)$"
30 - id: detect-private-key
31 # Checks for the existence of private keys.
32 - id: end-of-file-fixer
33 # Makes sure files end in a newline and only a newline.
34 exclude: ".*(data.*|extern.*|licenses.*|_static.*|_parsetab.py)$"
35 # - id: fix-encoding-pragma # covered by pyupgrade
36 - id: trailing-whitespace
37 # Trims trailing whitespace.
38 exclude_types: [python] # Covered by Ruff W291.
39 exclude: ".*(data.*|extern.*|licenses.*|_static.*)$"
40
41 - repo: https://github.com/pre-commit/pygrep-hooks
42 rev: v1.10.0
43 hooks:
44 - id: rst-directive-colons
45 # Detect mistake of rst directive not ending with double colon.
46 - id: rst-inline-touching-normal
47 # Detect mistake of inline code touching normal text in rst.
48 - id: text-unicode-replacement-char
49 # Forbid files which have a UTF-8 Unicode replacement character.
50
51 - repo: https://github.com/rbubley/mirrors-prettier
52 rev: v3.9.6
53 hooks:
54 - id: prettier
55 types_or: [css, scss, javascript, rst, json, yaml, toml, markdown]
56
57 - repo: https://github.com/woodruffw/zizmor-pre-commit
58 rev: v1.29.0
59 hooks:
60 - id: zizmor
61
62 - repo: https://github.com/astral-sh/ruff-pre-commit
63 rev: v0.16.1
64 hooks:
65 - id: ruff-check
66 args: ["--fix", "--show-fixes"]
67 - id: ruff-format
68
69 - repo: https://github.com/crate-ci/typos
70 rev: v1
71 hooks:
72 - id: typos
73
74 - repo: https://github.com/scientific-python/cookie
75 rev: 2026.06.18
76 hooks:
77 - id: sp-repo-review
78
79 # Linting hook for stylistic issues in rst doc files.
80 - repo: https://github.com/sphinx-contrib/sphinx-lint
81 rev: v1.0.2
82 hooks:
83 - id: sphinx-lint
84 exclude: "(licenses/|docs/_build/|.*parsetab.py|astropy/extern/)"