opensafely-core / ehrql

ehrQL: the electronic health record query language for OpenSAFELY
https://docs.opensafely.org/ehrql/
Other
6 stars 3 forks source link

Pre-commit hook local `just` fails #2017

Closed madwort closed 3 months ago

madwort commented 3 months ago

It appears to be passing the filename of files modified in the proposed commit as recipe names to just - it probably doesn't need to do this.

(.venv) tom@MadBook3 ehrql % just check
=> ruff format --diff --quiet .
=> ruff check --output-format=full .
All checks passed!
=> docker run --rm -i ghcr.io/hadolint/hadolint:v2.12.0-alpine < Dockerfile
(.venv) tom@MadBook3 ehrql % git commit -a
check....................................................................Failed
- hook id: check
- exit code: 1

error: Justfile does not contain recipe `tests/generative/ignored_errors.py`.

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
debug statements (python)................................................Passed
check python ast.........................................................Passed
check json...........................................(no files to check)Skipped
check toml...........................................(no files to check)Skipped
check yaml...........................................(no files to check)Skipped
detect private key.......................................................Passed
(.venv) tom@MadBook3 ehrql % just check
=> ruff format --diff --quiet .
=> ruff check --output-format=full .
All checks passed!
=> docker run --rm -i ghcr.io/hadolint/hadolint:v2.12.0-alpine < Dockerfile
(.venv) tom@MadBook3 ehrql % just check tests/generative/ignored_errors.py
error: Justfile does not contain recipe `tests/generative/ignored_errors.py`.
madwort commented 3 months ago

@evansd says

You can disable pre-commit for a single repo using: git config core.hooksPath /dev/null