mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
# Description of Changes The `pre-commit` commands in this repo are inconsistent with the rest of the dev workflow, as they are impossible to run through Task and they can cause CI to fail with no way for a developer to run the `pre-commit` scripts after they've failed. This PR adds `task pre-commit` (and `task pre-commit:fix`) and then hooks up the existing `pre-commit` hooks and CI to call the Task rule, so if developers are using pre-commit hooks then they should still work, but they're also runnable without using pre-commit at all. I think it'd be worth reviewing what we're actually running at pre-commit in the future because I'm not entirely convinced by all of the scripts that we are running, but this should at least make what we have properly enforced and usable by all devs.
15 lines
574 B
YAML
15 lines
574 B
YAML
# The actual checks live in .taskfiles/pre-commit.yml (with helper scripts under
|
|
# scripts/pre-commit/) and are driven by Task. This hook just delegates to `task
|
|
# pre-commit` so the git pre-commit hook, CI and a manual `task pre-commit` all
|
|
# run the exact same thing. Requires `task` and `uv` on PATH. To auto-fix instead
|
|
# of only checking, run `task pre-commit:fix`.
|
|
repos:
|
|
- repo: local
|
|
hooks:
|
|
- id: task-pre-commit
|
|
name: task pre-commit
|
|
entry: task pre-commit
|
|
language: system
|
|
pass_filenames: false
|
|
always_run: true
|