-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
executable file
·57 lines (57 loc) · 1.69 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
exclude: ^(buildspec.yml|.pre-commit-config.yaml)$
fail_fast: true
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=lf
- id: trailing-whitespace
- id: flake8
additional_dependencies:
- flake8-bugbear>=19.3.0
- flake8-builtins>=1.4.1
- flake8-commas>=2.0.0
- flake8-comprehensions>=2.1.0
- flake8-debugger>=3.1.0
- flake8-pep3101>=1.2.1
# language_version: python3.6
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-sort-keys
- id: check-merge-conflict
# - id: check-yaml # doesn't work with CloudFormation templates/intrinsics, should use cfn-lint instead
# language_version: python3.6
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.3.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-log-warn
- repo: https://github.com/PyCQA/bandit
rev: f5a6f0ca62 # TODO: update once a release > 1.5.1 hits with this change in
hooks:
- id: bandit
files: "^src/"
# have to skip B101, contract tests use it and there's no way to skip for specific files
# have to skip B322, as there is no way to indicate the codebase is Python 3 only (input only vulnerable in Py2)
args: ["--skip", "B101,B322"]
- repo: local
hooks:
- id: pylint-local
name: pylint-local
description: Run pylint in the local virtualenv
entry: pylint "src/" "tests/"
language: system
# ignore all files, run on hard-coded modules instead
pass_filenames: false
always_run: true