-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
111 lines (109 loc) · 3.71 KB
/
.pre-commit-config.yaml
File metadata and controls
111 lines (109 loc) · 3.71 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
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
---
# Common commands:
# prek install -f
# prek autoupdate
# prek run --all-files copier-template-tester
# prek run --all-files --hook-stage pre-commit
# prek run --all-files --hook-stage pre-push
# prek run --last-commit
# uv run calcipy lint.prek --no-update
#
# See https://pre-commit.com for more information
# and https://pre-commit.com/hooks.html for more hooks
# And: https://prek.j178.dev/builtin
# Only commit is installed by default: https://pre-commit.com/#pre-commit-install
# Pending rename of pre-push from: https://github.com/pre-commit/pre-commit/issues/2732
default_install_hook_types: ["commit-msg", "pre-commit", "pre-push"]
repos:
- repo: https://github.com/kyleking/copier-template-tester
rev: 2.2.0
hooks:
- id: copier-template-tester
# Sync below config with 'package_template'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
args: [--unsafe]
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: \.copier-answers\.yml|__snapshots__/.*\.ambr
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=auto]
- id: trailing-whitespace
exclude: __snapshots__/.*\.ambr
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.12.1
hooks:
- id: commitizen
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
- "mdformat-mkdocs[recommended]>=3.0.0"
- "mdformat-gfm-alerts>=1.0.1"
args: [--wrap=no]
exclude: _.+\.md|CHANGELOG\.md|CODE_TAG_SUMMARY\.md
stages: ["pre-commit"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
args: [--severity=warning]
exclude: \.jinja$
stages: ["pre-commit"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
additional_dependencies:
# Note: this version must be the same as the hook revision
- "prettier@4.0.0-alpha.8"
- "prettier-plugin-sh"
exclude: \.copier-answers\.yml|tests/.*/cassettes/.*\.yaml|__snapshots__/.*\.json
types_or: [css, html, javascript, json, shell, yaml]
stages: ["pre-commit"]
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.3
hooks:
- id: toml-sort-fix
exclude: uv\.lock
stages: ["pre-commit"]
- repo: local
hooks:
- id: copier-forbidden-files
entry: |
Found copier update rejection files; review them and remove them
(https://copier.readthedocs.io/en/stable/updating/)
files: \.rej$
language: fail
name: Copier Forbidden Files
- id: lint-fix
description: "Run ruff and apply fixes"
entry: uvx --from 'calcipy[recommended]>=6.0.1' calcipy-lint lint.fix
language: system
name: Lint-Fix
require_serial: true
stages: ["pre-commit"]
types: [python]
- id: tags
description: "Create a `CODE_TAG_SUMMARY.md` with a table for TODO- and FIXME-style code comments"
entry: uvx --from 'calcipy[recommended]>=6.0.1' calcipy-tags tags --doc-sub-dir=.
language: system
name: Tags
pass_filenames: false
require_serial: true
stages: ["pre-push"]