-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (67 loc) · 2.72 KB
/
.pre-commit-config.yaml
File metadata and controls
67 lines (67 loc) · 2.72 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
---
exclude: '^{{cookiecutter\.project_name}}/.*'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: b831c3dc5d27d9da294ae4e915773b99aa24a7c5 # frozen: v0.15.10
hooks:
- id: ruff-check
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/lycheeverse/lychee
rev: 623f9458f199f30ce923523214cfaf97663c6152 # frozen: nightly
hooks:
- id: lychee-docker
# Keep all other configs in the config file
args: ["--config", ".github/linters/lychee.toml"]
types: [markdown]
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
- id: actionlint-docker
- repo: https://github.com/koalaman/shellcheck-precommit
rev: 99470f5e12208ff0fb17ab81c3c494f7620a1d8d # frozen: v0.11.0
hooks:
- id: shellcheck
args: [ -x, --source-path=SCRIPTDIR ]
- repo: https://github.com/trufflesecurity/trufflehog
rev: 47e7b7cd74f578e1e3145d48f669f22fd1330ca6 # frozen: v3.94.3
hooks:
- id: trufflehog
# Resolve the repo root via git-common-dir so this works in both normal repos and worktrees
# (trufflehog doesn't support .git files used by worktrees).
# Guard against detached HEAD (e.g. CI) by falling back to the commit SHA.
language: system
entry: bash -c 'BRANCH=$(git rev-parse --abbrev-ref HEAD); [ "$BRANCH" = "HEAD" ] && BRANCH=$(git rev-parse HEAD); trufflehog git "file://$(cd "$(git rev-parse --git-common-dir)/.." && pwd)" --branch "$BRANCH" --since-commit HEAD~1 --no-verification --fail'
- repo: https://github.com/python-openapi/openapi-spec-validator
rev: 85b3337638d302ab966d8ec7aa5fc93dbd9f508c # frozen: 0.8.4
hooks:
- id: openapi-spec-validator
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: 4643f154907327ee0a2c7038f0296e0dd77d9776 # frozen: v10.0.0
hooks:
- id: cspell
types: [markdown]
args:
- --no-must-find-files
- --config
- .github/linters/cspell.config.js
- --no-progress
- --no-summary
- --gitignore
- --files # this needs to be the last argument so that the paths are passed correctly.