-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
93 lines (93 loc) · 2.53 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
# Install pre-commit hook
# pre-commit install
# Apply to all files without committing:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
# fail_fast: true # Uncomment to exit on first error
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.78.0
hooks:
- id: terraform_fmt
name: terraform-fmt
- repo: https://github.com/terraform-docs/terraform-docs
rev: v0.16.0
hooks:
- id: terraform-docs-go
name: terraform-docs for gcp func
args:
[
"-c",
"./.terraform-docs.yml",
"./terraform/google-scheduled-function",
]
- id: terraform-docs-go
name: terraform-docs for aws task
args:
[
"-c",
"./.terraform-docs.yml",
"./terraform/aws-ecs-task",
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
exclude: ^kubernetes/censys-cloud-connectors/templates
args: ["--unsafe"]
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.34.0
hooks:
- id: markdownlint-fix
name: fix markdownlint
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/python-poetry/poetry
rev: 1.4.0
hooks:
- id: poetry-check
# - id: poetry-lock
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
- repo: local
hooks:
- id: system
name: black
entry: poetry run black .
pass_filenames: false
language: system
types: [python]
- id: system
name: isort
entry: poetry run isort .
pass_filenames: false
language: system
types: [python]
- id: system
name: flake8
entry: poetry run flake8 .
pass_filenames: false
language: system
types: [python]
require_serial: true
args: [--darglint-ignore-regex, .*] # Skip docstring checks
- id: system
name: mypy
entry: poetry run mypy -p censys.cloud_connectors
pass_filenames: false
language: system
types: [python]
require_serial: true