generated from NASA-PDS/template-repo-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
68 lines (61 loc) · 1.84 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: check-json #checks json files for parseable syntax.
- id: pretty-format-json #sets a standard for formatting json files.
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.81.0
hooks:
- id: terraform_fmt #Rewrites all Terraform configuration files to a canonical format.
- id: terraform_validate #Validates all Terraform configuration files.
# - id: terraform_tflint #Validates all Terraform configuration files with TFLint.
# - id: terrascan #Detect compliance and security violations of Terraform templates.
# - id: terraform_tfsec
# - id: terraform_docs
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
files: ^src/|tests/
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy src
language: system
pass_filenames: false
- repo: local
hooks:
- id: black
name: black
entry: black
files: ^src/|tests/
language: system
types: [python]
- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8 src
language: system
pass_filenames: false
- repo: local
hooks:
- id: tests
name: Tests
entry: pytest
language: system
stages: [push]
pass_filenames: false
# #65: support for git-secrets
- repo: https://github.com/awslabs/git-secrets.git
# We have to use an sha here instead of a tag because of awslabs/git-secrets#182
rev: b9e96b3212fa06aea65964ff0d5cda84ce935f38
hooks:
- id: git-secrets