This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
82 lines (82 loc) · 2.67 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
---
# Common commands:
# poetry run pre-commit install
# poetry run pre-commit run --all-files --hook-stage commit
# poetry run pre-commit run --all-files --hook-stage push
# poetry run doit run pre_commit_hooks
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
# - id: check-case-conflict # Too Slow...
- 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
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: [--remove]
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=auto]
- id: pretty-format-json
args: [--autofix]
# Conflicts with ordering by poetry
# - id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.29.3
hooks:
- id: commitizen
additional_dependencies: [cz_legacy]
stages: [commit-msg]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.3.0
hooks:
# Can't generate baseline with Py 3.8. Use exclude regex rules instead
# See: https://github.com/Yelp/detect-secrets/issues/452
- id: detect-secrets
# args: ["--baseline", ".secrets.baseline"]
exclude: poetry.lock|cassettes/.*\.yaml
stages: [push]
- repo: https://github.com/lyz-code/yamlfix/
rev: 1.0.1
hooks:
- id: yamlfix
exclude: .copier-answers.yml
types_or: []
types: [file, yaml]
- repo: local
hooks:
- id: copier-forbidden-files
name: copier_forbidden_files
# yamllint disable-line rule:line-length
entry: found copier update rejection files; review them and remove them (https://copier.readthedocs.io/en/stable/updating/)
language: fail
files: \.rej$
- id: python-formatter
name: Python Auto-Formatter
description: Apply calcipy formatting
language: system
entry: poetry run doit run format_py
types: [python]
stages: [push]
- id: toml-formatter
name: Optional TOML Auto-Formatter
description: Install taplo with 'npm install -g @taplo/cli'
language: system
entry: poetry run doit run format_toml
types: [toml]
exclude: poetry.lock