forked from Lucas-C/pre-commit-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
86 lines (86 loc) · 2.58 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
---
exclude: ^(\.[^/]*cache(__)?/.*|(.*/)?\.coverage)$
repos:
# Perform Markdown formatting before other hooks "fixing" line endings:
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
name: Format Markdown
entry: mdformat # Executable to run, with fixed options
language: python
types: [markdown]
args: [--wrap, '75', --number]
additional_dependencies:
- mdformat-toc
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
exclude: tests/resources/main.*_with_license.cpp
- id: remove-tabs
exclude: tests/resources/main.*_with_license.cpp
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
files: ''
exclude: tests/resources/main.*_with_license.cpp
- id: check-yaml
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
- id: pyupgrade
args:
- --py37-plus
exclude: ^tests/resources/.*
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
args:
- --rcfile=.pylintrc
- --reports=no
- --py-version=3.7
additional_dependencies: [pytest, fuzzywuzzy]
exclude: ^tests/resources/.*(init_with_license\.py|todo).*$
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
stages: [manual] # Skip in automated run for now
args:
- --safe
- --quiet
exclude: ^tests/resources/.*(init_with_license\.py|todo).*$
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
rev: v1.0.6
hooks:
- id: python-bandit-vulnerability-check
args: [--skip, 'B101', --recursive, .]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
hooks:
- id: mypy
args:
- --ignore-missing-imports
- --install-types
- --non-interactive
- --check-untyped-defs
- --show-error-codes
- --show-error-context
- repo: local
hooks:
- id: py.test
name: py.test
language: python
additional_dependencies: [pytest, pytest-cov, coverage, fuzzywuzzy, Levenshtein]
entry: pytest -sv
require_serial: true
pass_filenames: false
files: \.py$