forked from saltstack/salt-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
97 lines (88 loc) · 2.6 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
94
95
96
97
---
minimum_pre_commit_version: 1.15.2
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
- repo: https://github.com/s0undt3ch/python-tools-scripts
rev: "0.12.0"
hooks:
- id: tools
alias: actionlint
name: Lint GitHub Actions Workflows
files: "^.github/workflows/"
types:
- yaml
args:
- pre-commit
- actionlint
- repo: https://github.com/jazzband/pip-tools
rev: 6.13.0
hooks:
- id: pip-compile
files: ^requirements/release\.(in|txt)$
args:
- requirements/release.in
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.9+
args: [--py39-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.8.2
hooks:
- id: reorder-python-imports
args: [--py39-plus]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args: []
# - repo: https://github.com/PyCQA/flake8
# rev: 3.9.2
# hooks:
# - id: flake8
# language_version: python3
# additional_dependencies:
# - flake8-mypy-fork
# - flake8-docstrings
# - flake8-typing-imports
#
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.0.0
# hooks:
# - id: mypy
# alias: mypy-tools
# name: Run mypy against tools
# files: ^tools/.*\.py$
# #args: [--strict]
# additional_dependencies:
# - attrs
# - rich
# - types-attrs
# - types-pyyaml
# - types-requests
- repo: local
hooks:
- id: generate-actions-workflow
name: Generate Github Actions Workflow
entry: .github/workflows/templates/generate.py
pass_filenames: false
files: '^.github/workflows/.*$'
language: script
- id: shellcheck
name: Run ShellCheck against bootstrap-salt.sh
entry: koalaman/shellcheck-alpine:v0.7.0 shellcheck -s sh -f tty
files: 'bootstrap-salt\.sh'
language: docker_image