forked from vmware/versatile-data-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
91 lines (90 loc) · 2.48 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
# Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
args: ['--unsafe']
# exclude helm chart templates
exclude: ^projects/control-service/projects/helm_charts
- id: check-json
- id: check-ast
- id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
language_version: python3.7
# ensure pydoc is up-to standard
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
args: # http://www.pydocstyle.org/en/stable/error_codes.html --convention=pep257 seems too much?
- --select=D101,D103,D300
- --match='(?!test_).*\.py'
- repo: https://github.com/pre-commit/mirrors-pylint
rev: 'v3.0.0a4'
hooks:
- id: pylint
args: [--exit-zero]
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.812
# hooks:
# - id: mypy
# files: ^(src/|tests/|plugins/)
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
args: [--py37-plus, '--application-directories=.:src']
# use latest python syntax
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py37-plus]
# security check
#- repo: https://github.com/PyCQA/bandit
# rev: '1.7.0'
# hooks:
# - id: bandit
# exclude: tests
# args: [ -s, B101 ]
# add copyright notice
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
hooks:
- id: insert-license
files: \.java$
args:
- --license-filepath
- NOTICE.txt
- --comment-style
- /*| *| */
- id: insert-license
files: \.py$
args:
- --license-filepath
- NOTICE.txt
- id: insert-license
files: \.sh$
args:
- --license-filepath
- NOTICE.txt
# License header create issues in helm chart yaml files
# https://github.com/helm/helm/issues/4409
# - id: insert-license
# files: \.yml$
# args:
# - --license-filepath
# - NOTICE.txt
# - id: insert-license
# files: \.yaml$
# args:
# - --license-filepath
# - NOTICE.txt