2026-04-16 15:14:18 +02:00
|
|
|
repos:
|
2026-05-10 10:48:18 +02:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
|
rev: v4.6.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: check-added-large-files
|
|
|
|
|
args: ['--maxkb=500']
|
|
|
|
|
- id: check-merge-conflict
|
|
|
|
|
- id: check-case-conflict
|
|
|
|
|
- id: detect-private-key
|
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
|
2026-04-16 15:14:18 +02:00
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
2026-05-14 21:12:52 +02:00
|
|
|
- id: check-no-binary
|
|
|
|
|
name: check for binary files (build artifacts, databases)
|
|
|
|
|
language: system
|
|
|
|
|
entry: bash -c 'cd "$(git rev-parse --show-toplevel)" && scripts/check_no_binary.sh'
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
always_run: true
|
2026-05-10 10:48:18 +02:00
|
|
|
- id: forbidden-files-hook
|
|
|
|
|
name: check for forbidden home-directory files
|
|
|
|
|
language: system
|
2026-05-13 17:13:38 +02:00
|
|
|
entry: bash -c 'cd "$(git rev-parse --show-toplevel)" && nix develop --command task check-hygiene'
|
2026-05-10 10:48:18 +02:00
|
|
|
pass_filenames: false
|
|
|
|
|
always_run: true
|
2026-04-28 12:36:30 +02:00
|
|
|
- id: dart-check
|
|
|
|
|
name: dart format (autofix) + check-fast (parallel)
|
2026-04-20 18:08:09 +02:00
|
|
|
language: system
|
2026-04-28 12:36:30 +02:00
|
|
|
entry: bash -c 'cd "$(git rev-parse --show-toplevel)" && nix develop --command scripts/pre_commit_check.sh'
|
2026-04-16 15:14:18 +02:00
|
|
|
pass_filenames: false
|
|
|
|
|
always_run: true
|
2026-05-17 16:43:52 +02:00
|
|
|
- id: ci-no-direct-dagger
|
|
|
|
|
name: check for direct dagger calls in workflows (use Task instead)
|
|
|
|
|
language: system
|
|
|
|
|
entry: "bash -c 'git grep \"dagger call\" .forgejo/workflows/ && echo \"ERROR: Direct dagger calls found in workflows. Use Taskfile instead.\" && exit 1 || exit 0'"
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
always_run: true
|
|
|
|
|
- id: dagger-progress-plain
|
|
|
|
|
name: ensure all dagger calls use --progress=plain
|
|
|
|
|
language: system
|
|
|
|
|
entry: "bash -c 'git grep \"dagger call\" -- \":!.pre-commit-config.yaml\" | grep -v \"\\-\\-progress=plain\" && echo \"ERROR: All dagger calls must include --progress=plain\" && exit 1 || exit 0'"
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
always_run: true
|