forked from aws/aws-parallelcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
51 lines (46 loc) · 1.61 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
args: ['--unsafe'] # necessary for jinja-templated yaml files
- id: debug-statements
- id: detect-private-key
- id: check-symlinks
- id: end-of-file-fixer
- id: pretty-format-json
args: ['--autofix']
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=no']
- repo: https://github.com/PyCQA/flake8
# https://gitlab.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-bugbear, flake8-mypy, flake8-colors, pep8-naming]
# If flake8 isn't run from the CLI directory it doesn't read in its configuration in the same way.
# Paths are relative to the top-level of the repo so the nested shell handles that.
entry: bash -c 'cd cli && flake8 $(for arg in $@; do echo -n "../$arg " ; done)'
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
args: ['-rc', '-w 120', '--settings-path=cli/.isort.cfg']
- repo: https://github.com/ambv/black
rev: 23.1.0
hooks:
- id: black
args: ['-l 120']
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: ['-r', '-c', 'cli/.bandit.ini', '--exclude', 'tests,cli/tests,cloudformation/tests']