forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
96 lines (96 loc) · 2.81 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
93
94
95
96
#
# This is the configuration file for the pre-commit framework.
# To use this you need to install it seperately and activate it for your repository.
# To do so issue the following commands:
#
# pip3 install pre-commit
#
# and in your repository
#
# pre-commit install
#
# That's it. You're done.
#
default_stages:
- commit
- push
- manual
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
types: [file]
- id: check-yaml
- id: end-of-file-fixer
exclude: .werks/.*
- id: fix-encoding-pragma
args: ["--remove"]
exclude: |
(?x)^(
^agents/plugins/|
^enterprise/agents/plugins/|
^tests/agent-plugin-unit/
)
- repo: local
hooks:
- id: remove-stale-imports
name: Remove stale imports
language: script
entry: scripts/run-autoflake
types: [file, python]
- id: isort
name: Run isort
entry: scripts/run-isort
language: script
types: [file, python]
- id: black
name: Run black
entry: scripts/run-black
language: script
types: [file, python]
- id: omd-python-modules
name: Check Python modules in OMD
entry: scripts/check-omd-python-modules
language: script
files: omd/packages/python3?-modules
types: [file]
- id: pylint
name: Check pylint
entry: scripts/check-pylint
language: script
types: [file, python]
- id: doctest
name: Doctests
entry: scripts/run-doctests
language: script
types: [file, python]
verbose: true
- id: mypy
name: Check types with mypy
entry: scripts/run-mypy
language: script
types: [file, python]
- id: licence
name: Check licence headers
entry: scripts/check-licence
language: script
types: [file, python]
- id: absolute-imports
name: Check absolute imports
entry: scripts/check-absolute-imports.py
language: script
types: [file, python]
- id: flake8
name: Check flake8
entry: scripts/check-flake8
language: script
types: [file, python]
verbose: true
- id: unittest
name: unittests
entry: scripts/run-unittests
language: script
types: [file, python]
verbose: true