forked from red-hat-data-services/agentic-starter-kits
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
68 lines (62 loc) · 2.17 KB
/
.pre-commit-config.yaml
File metadata and controls
68 lines (62 loc) · 2.17 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
68
# Pre-commit configuration for agentic-starter-kits
# Install: pre-commit install --install-hooks
# Run manually: pre-commit run --all-files
default_install_hook_types:
- pre-commit
- commit-msg
repos:
# Enforce Conventional Commits in commit messages
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.11.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
# more args can be added here to customize the linter behavior
# more args can be found here: https://github.com/espressif/conventional-precommit-linter
args:
- --types=feat,fix,docs,chore,test,perf,refactor,ci,build,style,revert
- --subject-min-length=10
- --subject-max-length=72
- --allow-breaking
# Standard file-hygiene hooks (run before linters so they see clean files)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
exclude: ^charts/
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=1000]
- id: debug-statements
- id: check-case-conflict
- id: mixed-line-ending
- id: no-commit-to-branch
args: [--branch=main]
- id: detect-private-key
# Ruff — Python linting and formatting
# Rules are defined in ruff.toml at the repo root
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# Markdownlint — Markdown linting
# Rules are defined in .markdownlint.jsonc at the repo root
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.1
hooks:
- id: markdownlint-cli2
args: [--fix]
# Actionlint — GitHub Actions workflow validation
# Keep version in sync with raven-actions/actionlint in .github/workflows/code-quality.yml
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
- id: actionlint
files: ^\.github/workflows/