-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (52 loc) · 2.05 KB
/
.pre-commit-config.yaml
File metadata and controls
52 lines (52 loc) · 2.05 KB
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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/pycqa/flake8.git
rev: 7.3.0
hooks:
- id: flake8
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.0.0
hooks:
- id: bashate
entry: bashate --error . --ignore=E006,E040,E042
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja
# templating, this is very difficult)
# E040: Syntax error determined using `bash -n` (as many scripts
# use jinja templating, this will often fail and the syntax
# error will be discovered in execution anyway)
- repo: https://github.com/PyCQA/pylint
rev: v3.3.8
hooks:
- id: pylint
args:
[
"--disable=C0209,R0917,R1705,R1734,R1735,W1514,W3301"
]
# C0209: Formatting a regular string which could be an
# f-string (consider-using-f-string)
# R0917: Too many positional arguments (25/5)
# (too-many-positional-arguments)
# R1705: Unnecessary "else" after "return", remove the "else"
# and de-indent the code inside it (no-else-return)
# R1734: Consider using [] instead of list() (use-list-literal)
# R1753: Consider using '{}' instead of a call to 'dict'.
# (use-dict-literal)
# W1514: Using open without explicitly specifying
# an encoding (unspecified-encoding)
# W3301: Do not use nested call of 'min'; it's possible to do
# 'min(8, max(2, processutils.get_worker_count()),
# len(containers))'
# instead (nested-min-max)