forked from bendog/pythonwa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
87 lines (79 loc) · 1.97 KB
/
.pre-commit-config.yaml
File metadata and controls
87 lines (79 loc) · 1.97 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
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
exclude: '^$'
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1024']
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: fix-byte-order-marker
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
- id: mixed-line-ending
args: ["--fix=lf"]
- id: end-of-file-fixer
- id: check-shebang-scripts-are-executable
- id: detect-private-key
- id: check-json
- id: pretty-format-json
args: ['--autofix', '--indent', '2', '--no-sort-keys']
exclude: ^Pipfile
- id: check-yaml
exclude: ^charts/
- id: check-toml
# commit messages
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.10.0
hooks:
- id: commitizen
stages: [commit-msg]
# Terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.89.1
hooks:
- id: terraform_fmt
- id: terraform_validate
# - id: terraform_docs_replace
- id: terraform_tflint
args: ['--args=--disable-rule=terraform_unused_declarations']
- id: terraform_tfsec
# Python tools
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.2
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
# Run the formatter.
- id: ruff-format
# Shell script tools
- repo: https://github.com/pecigonzalo/pre-commit-shfmt
rev: v2.1.0
hooks:
- id: shell-fmt-go
args:
- -i
- "2"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
# LEGACY python
# - repo: https://github.com/PyCQA/isort
# rev: 5.13.2
# hooks:
# - id: isort
# additional_dependencies: ["toml"]
# - repo: https://github.com/psf/black
# rev: 23.12.1
# hooks:
# - id: black
# additional_dependencies: ["toml"]
# - repo: https://github.com/PyCQA/flake8
# rev: 7.0.0
# hooks:
# - id: flake8