forked from teemtee/tmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
92 lines (84 loc) · 2.72 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
92
# 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/mirrors-autopep8
rev: 'v1.7.0'
hooks:
- id: autopep8
args:
- --recursive
- --in-place
- --aggressive
- --aggressive
- --hang-closing
- --max-line-length=99
- repo: https://github.com/PyCQA/isort
rev: "5.10.1"
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: "6.0.0"
hooks:
- id: flake8
args:
- --config
- .flake8
# The list of directories and files to check - matches flake8
# configuration in setup.cfg, but has a slightly different
# purpose. setup.cfg tells flake8 what to check when called e.g.
# by pre-commit or IDE linter integration, the list below tells
# *pre-commit* to which files to apply flake8 check.
files: >
(?x)^(
bin/.*|
examples/.*|
tests/.*|
tmt/.*|
setup.py
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.991"
hooks:
- id: mypy
# Do not install *types-click* - it's not recommended with Click 8 & newer,
# which is the version a developer encounters given the requirements are not
# frozen.
additional_dependencies: [click]
pass_filenames: false
args:
- --config-file
- mypy.ini
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.20.0"
hooks:
- id: check-metaschema
name: "Check JSON schemas validity"
files: ^tmt/schemas/.*\.yaml
- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
hooks:
- id: yamllint
files: ^tmt/schemas/.*\.yaml
# Yet another static analysis - these hooks use regular expressions to
# process Python code, and offer interesting "metalinters", checks for
# what we do to appease flake8 and mypy linters.
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
# Enforce `noqa` and `type: ignore` to always appear with specific
# error code(s).
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
# Other potentially useful hooks for future consideration:
#
# - id: python-check-mock-methods
# - id: python-no-eval
# - id: python-no-log-warn
# - id: python-use-type-annotations
# - id: text-unicode-replacement-char