forked from GitGuardian/ggshield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
91 lines (80 loc) · 2.27 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
83
84
85
86
87
88
89
90
91
default_stages: [commit]
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
exclude: snap_
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
# use a "local" repo and not the mypy repo to avoid having to duplicate the
# list of types-* packages
- repo: local
hooks:
- id: mypy
name: mypy
entry: 'pipenv run mypy'
language: system
types: [python]
# use require_serial so that script is only called once per commit
require_serial: true
# print the number of files as a sanity-check
verbose: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-json
- id: check-added-large-files
- id: check-yaml
- repo: https://github.com/Woile/commitizen
rev: v2.35.0
hooks:
- id: commitizen
# don't forget to run pre-commit install --hook-type commit-msg for this hook to run
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-prettier # to format JSON, YAML and markdown files among others
rev: v2.4.1
hooks:
- id: prettier
- repo: local
hooks:
- id: ggshield-local
name: GitGuardian Shield
entry: pipenv run ggshield secret scan pre-commit
language: system
types: [python]
stages: [commit]
- repo: local
hooks:
- id: ggshield-local
name: GitGuardian Shield
entry: pipenv run ggshield secret scan pre-push
language: system
pass_filenames: false
types: [python]
stages: [push]
- repo: https://github.com/gitguardian/ggshield
rev: v1.14.2
hooks:
- id: ggshield
language_version: python3
stages: [commit]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/thlorenz/doctoc
rev: v2.2.0
hooks:
- id: doctoc
types: [markdown]
# Can't use "args: [README.md]" because it *adds* the
# argument to the list
files: '^README\.md$'
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.19.0
hooks:
- id: check-github-workflows