-
Notifications
You must be signed in to change notification settings - Fork 61
/
.pre-commit-config.yaml
93 lines (87 loc) · 2.89 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
# 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/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- name: Check and insert license on Python files
id: insert-license
exclude: .*\__init__.py$
files: .*\.py$
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --no-extra-eol
- name: Check and insert license on select YAML files
id: insert-license
files: ansible_collections/arista/cvp/roles/.*/(handlers|tasks)/.*\.yml$
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --no-extra-eol
- name: Check and insert license on Jinja2 files
id: insert-license
files: .*\.j2$
exclude: ansible_collections/arista/cvp/molecule.*
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '{#||#}'
- --no-extra-eol
- name: Check and insert license on Markdown files
id: insert-license
files: .*\.md$
exclude: (ansible_collections/arista/cvp/molecule|.github|ansible_collections/arista/cvp/examples/.+/documentation/).*
args:
- --license-filepath
- development/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '<!--| ~| -->'
- repo: https://github.com/pycqa/pylint
rev: "v3.1.1"
hooks:
- id: pylint # Use pylintrc file in repository
name: Check for Linting errors on Python files
description: This hook runs pylint.
types: [python]
args:
# Suppress duplicate code for modules header
- -d duplicate-code
- repo: https://github.com/adrienverge/yamllint.git
rev: 'v1.35.1'
hooks:
- id: yamllint
name: Check for Linting error on YAML files
description: This hook runs yamllint.
entry: yamllint
language: python
types: [file, yaml]
args: [-c=.github/yamllintrc]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args:
- --config=.github/.markdownlint.yaml
- --ignore-path=.github/.markdownlintignore
- --fix