forked from openslide/openslide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
76 lines (68 loc) · 2.03 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
# exclude vendored files
exclude: '^(COPYING\.LESSER|subprojects/.*)$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# We don't want to allow arbitrarily large binary diffs into the
# repo, where they'll live in the Git history forever. At the time
# of writing, our largest xdelta diff is 4881 bytes. Arbitrarily
# set the cutoff at 6000.
# https://openslide.org/docs/testsuite/#tips
- id: check-added-large-files
name: Check for overlarge tests
args: [--maxkb=6]
files: ^test/cases/
- id: check-added-large-files
args: [--maxkb=200]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
name: Modernize python code
exclude: ^misc/
args: ["--py38-plus"]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: Reorder python imports with isort
exclude: ^misc/
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
name: Format python code with black
exclude: ^misc/
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
exclude: ^misc/
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
name: Lint python code with flake8
additional_dependencies: [flake8-bugbear, Flake8-pyproject]
exclude: ^misc/
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: local
hooks:
- id: autoptr
name: Check for g_auto* declarations without initializers
language: pygrep
types: [c]
entry: "(g_auto\\(|g_autoptr\\(|g_autofree )(?!.+=)"