-
Notifications
You must be signed in to change notification settings - Fork 15
/
.pre-commit-config.yaml
61 lines (61 loc) · 1.78 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
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 # Use the latest tag from the repository
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: detect-private-key
- id: requirements-txt-fixer
# Add black for Python code formatting
- repo: https://github.com/psf/black
rev: 23.9.1 # Use the latest stable version of Black
hooks:
- id: black
# Add isort for sorting imports in Python
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
# Add pydocstyle for checking docstrings
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0 # Use the latest stable version of pydocstyle
hooks:
- id: pydocstyle
# Lint: YAML
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
files: \.(yaml|yml)$
- repo: https://github.com/google/yamlfmt
rev: v0.10.0
hooks:
- id: yamlfmt
# Lint: Shell scripts
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["-x"]
# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: ["--fix", "--config", ".markdownlint.json"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/gitleaks/gitleaks
rev: v8.19.0
hooks:
- id: gitleaks
args: ["--source", ".", "--config", ".gitleaks.toml"]