forked from GoogleCloudPlatform/slurm-gcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
78 lines (78 loc) · 2.13 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
---
exclude: ^ansible/roles/google_cloud_ops_agents/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: requirements-txt-fixer
- id: check-json
- id: check-yaml
- id: sort-simple-yaml
- id: debug-statements
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.17
hooks:
- id: pymarkdown
# Rules at https://github.com/jackdewinter/pymarkdown/tree/main/docs/rules
# MD013 - Line length
# MD022 - Headers should be surrounded by blank lines
# MD033 - Inline HTML
# MD034 - Bare URL used
# MD041 - First line in file should be a top level header
# MD046 - Code block style
# MD024 - Multiple headings cannot contain the same content.
args: [--disable-rules, 'MD013,MD022,MD033,MD034,MD041,MD046,MD024', scan]
# this is a temporary hack to disable pymarkdown until all files are brought
# in line with its expectations
exclude_types:
- markdown
- repo: https://github.com/google/yamlfmt
rev: v0.11.0
hooks:
- id: yamlfmt
- repo: local
hooks:
- id: packer_fmt
name: Packer fmt
entry: packer fmt -recursive .
files: \.pkr(vars)?\.hcl$
language: system
types: [file, text]
pass_filenames: false
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.4
hooks:
- id: terraform_fmt
- id: terraform_validate
- id: terraform_tflint
- id: terraform_docs
args:
- --args=--config=.terraform-docs.yaml
- --hook-config=--create-file-if-not-exist=true
- --hook-config=--path-to-file=README_TF.md
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
exclude: ^dm/
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
exclude: ^dm/
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
- id: codespell
alias: codespell-apply
args: [-w]
stages: [manual]