-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
79 lines (71 loc) · 2.16 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
# pre-commit is a linter runner and GitHub hook manager
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Run `pre-commit autoupdate` now and then, why don't ya?
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
types: [text]
stages: [commit, push, manual]
- id: end-of-file-fixer
types: [text]
stages: [commit, push, manual]
- id: check-ast
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: ["--maxkb=2200"]
- id: check-docstring-first
- id: check-merge-conflict
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter. Replaces black.
- id: ruff-format
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
description: Automatically upgrade syntax for newer versions.
types: [python]
args: [--py37-plus]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# Linter for markdown files
# This hook uses DavidAnson Node.js markdownlint in a Docker to minimize dev environment at the cost of speed
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint
language: docker_image
entry: ghcr.io/igorshubovych/markdownlint-cli:v0.31.1
# Scan for secrets
- repo: https://github.com/zricethezav/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks-docker
# Lint GitHub Actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
hooks:
- id: actionlint-docker
- repo: local
hooks:
- id: block-files
name: Block forbidden files
entry: ./scripts/block-files.sh
language: script
pass_filenames: false
always_run: true