-
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: 3db93a2be6f214ed722bf7bce095ec1b1715422a # frozen: v0.14.2
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: cef607cddb6279091869bcbb8fb4b906fd4c046c # 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: e7d448ef7507c20fc4c88a95d0c448b848cd6127 # frozen: v1.7.8
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: ad6fc8fb446b8fafbf7ea8193d2d6bfd42f45690 # frozen: v3.90.11
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: a76da2ffdaf698a7fdbd755f89b051fef4c790fd # frozen: 0.8.0b1
hooks:
- id: openapi-spec-validator
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: 3749de0c02b93bbbe0eae9d7d72da1ecf3c7a2e0 # frozen: v9.2.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.