-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
47 lines (42 loc) · 1.29 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
47 lines (42 loc) · 1.29 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
# Pre-commit hooks for OpenContext
# Install: uv run pre-commit install
# Run manually: uv run pre-commit run --all-files
# See https://pre-commit.com for more
repos:
# General file hygiene
- 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
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict
- id: detect-private-key
# Python: Ruff lint (with auto-fix) and format (matches CI: core/ plugins/ server/ tests/)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.1
hooks:
- id: ruff-check
args: [--fix, --unsafe-fixes]
files: ^(core|plugins|server|tests)/
- id: ruff-format
files: ^(core|plugins|server|tests)/
# YAML linting (uses .yamllint.yaml in repo root)
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [-c, .yamllint.yaml]
# Go formatting (client/ only)
- repo: local
hooks:
- id: gofmt
name: gofmt
entry: gofmt
args: [-w]
language: system
types: [go]
files: ^client/
# pip-audit runs in CI; run manually: uv run pip-audit -r requirements.txt