Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
47 lines (45 loc) · 1.71 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
47 lines (45 loc) · 1.71 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 this repository: ruff (format + check) plus standard
# file-hygiene checks. Heavier validation (typing, lockfile freshness,
# OpenAPI drift) runs in CI rather than as commit-time hooks.
#
# A built web-UI bundle may be committed at this path (vendored, minified
# JS/CSS) — never lint or "fix" it.
exclude: ^omnigent/server/static/web-ui/
repos:
- repo: local
hooks:
- id: ruff-format
name: ruff format
language: system
entry: .venv/bin/python -m ruff format --force-exclude
types: [python]
- id: ruff-check
name: ruff check
language: system
entry: .venv/bin/python -m ruff check --fix --force-exclude
types: [python]
# ── File hygiene ────────────────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
name: trim trailing whitespace
exclude: \.(md|svg)$
- id: end-of-file-fixer
name: ensure files end with newline
exclude: \.(md|svg)$
- id: check-yaml
name: check yaml syntax
# docker-compose override files use non-standard tags
# (`!reset`, `!override`) that PyYAML can't parse.
exclude: ^deploy/docker/docker-compose\.[a-z]+\.yaml$
- id: check-merge-conflict
name: check for merge conflicts
- id: check-added-large-files
name: prevent large files
args: ['--maxkb=1000']
- id: check-case-conflict
name: check for case conflicts
- id: mixed-line-ending
name: check line endings
args: ['--fix=lf']