-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
70 lines (70 loc) · 1.91 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
---
# INSTALL .: `pre-commit install --install-hooks`
# UPDATE ..: `pre-commit autoupdate`
exclude: |
(?x)^(
CHANGELOG\..*|
\.copier-answers\..*
)$
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Generall Stuff
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '\.svg$'
- id: mixed-line-ending
args:
- "--fix=lf"
# VCS
- id: check-merge-conflict
# Config / Data Files (syntax check only)
- id: check-json
- id: check-yaml
- id: check-toml
# Prettier (HTML, JS, CSS, Markdown, YAML…)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
hooks:
- id: prettier
# Python: check project
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.1
hooks:
- id: validate-pyproject
# Python: check syntax
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.258
hooks:
- id: ruff
args:
- "--fix"
- "--exit-non-zero-on-fix"
# Python: lint with black
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
# Python: audit requirements
# NOTE: This intentionally ignores `requirements.dev.txt`. If you want to
# check those too, you can use `files: requirements` below (or similar).
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.1
hooks:
- id: python-safety-dependencies-check
files: requirements\.txt
# Shell
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.2
hooks:
- id: shellcheck
- repo: local
hooks:
- id: forbidden-files
name: prevent files from being commited in git
entry: found Copier update rejection files; review and remove them
language: fail
files: "\\.rej$"