Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (67 loc) · 2.65 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
67 lines (67 loc) · 2.65 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
# Checks run on commit (`pre-commit install`) and in CI (`pre-commit run
# --all-files`, plus the manual-stage `gitleaks-all` hook); hook versions are
# pinned to commits
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-merge-conflict
- id: check-yaml
# Helm templates are not valid YAML before rendering; `mkdocs.yml`
# uses MkDocs' `!ENV` tag (the docs build checks it)
exclude: ^(charts/tesk/templates/|mkdocs\.yml$)
# The copy of tesk-core in `source/` is left as it is (not maintained
# here)
- id: end-of-file-fixer
exclude: ^source/tesk-core/
# Keeps Markdown hard line breaks (two trailing spaces)
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: ^source/tesk-core/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: c0f278f1254ccc8fb09676bcdb8d847e7db493e5 # frozen: v0.17.4
hooks:
# The Python code of this repository: the docs hooks and the tests
# (not the copy of tesk-core in `source/`)
- id: ruff-check
exclude: ^source/
- id: ruff-format
exclude: ^source/
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # frozen: v0.11.0.1
hooks:
# The shell scripts of this repository (e.g., `tests/smoke/`), not the
# copy of tesk-core in `source/`
- id: shellcheck
exclude: ^source/
- repo: https://github.com/gitleaks/gitleaks
rev: 83d9cd684c87d95d656c1458ef04895a7f1cbd8e # frozen: v8.30.1
hooks:
# Staged changes on commit
- id: gitleaks
# The whole checkout, in CI (`--hook-stage manual`); also scans
# untracked and ignored files when run locally
- id: gitleaks
alias: gitleaks-all
name: Detect hardcoded secrets (all files)
entry: gitleaks dir --redact --verbose
stages: [manual]
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
# Workflows (`.github/workflows/`); also checks their scripts with
# shellcheck if it is installed (as on GitHub-hosted runners)
- id: actionlint
- repo: local
hooks:
# Uses the installed dev dependencies (dependency group `dev` of
# `pyproject.toml`), to check the imported packages; checks the files
# of `[tool.mypy]`
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
pass_filenames: false