forked from ChelseaKR/mrf-honest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
47 lines (45 loc) · 1.43 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
47 lines (45 loc) · 1.43 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 + pre-push hooks for mrf-honest.
#
# Setup (once):
# pre-commit install # fast hooks on every commit
# pre-commit install --hook-type pre-push # full gate before push
#
# The lint/typecheck/test hooks are LOCAL and call the same Makefile targets `make verify` runs,
# using the repo's own .venv (uv sync --extra dev, versions from uv.lock). Hook results therefore
# always match the gate; there is no second toolchain to drift.
default_install_hook_types: [pre-commit, pre-push]
default_stages: [pre-commit]
repos:
- 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-toml
- id: check-added-large-files
args: ["--maxkb=800"]
- id: check-merge-conflict
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: local
hooks:
- id: lint
name: ruff check (make lint)
entry: make lint
language: system
types: [python]
pass_filenames: false
- id: typecheck
name: mypy --strict (make typecheck)
entry: make typecheck
language: system
types: [python]
pass_filenames: false
- id: test
name: pytest with coverage floor (make test)
entry: make test
language: system
stages: [pre-push]
always_run: true
pass_filenames: false