build(make): add lint target and run it as part of make test
`make lint` runs ruff on src and tests directly on the host, using the same invocation as the lint-python workflow so local and CI agree. The script fails with a clear install hint when ruff is not on PATH. `make test` now depends on `lint`, so linting runs before the container images are built. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
15
scripts/lint/python.sh
Executable file
15
scripts/lint/python.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "============================================================"
|
||||
echo ">>> Running RUFF lint on src and tests (local, no container)"
|
||||
echo "============================================================"
|
||||
|
||||
if ! command -v ruff >/dev/null 2>&1; then
|
||||
echo "ruff is not installed or not on PATH." >&2
|
||||
echo "Install it with: pip install ruff" >&2
|
||||
exit 127
|
||||
fi
|
||||
|
||||
ruff --version
|
||||
ruff check src tests
|
||||
Reference in New Issue
Block a user