Cut commentary from 104 to 24 lines across the new lint script, CI config, and pre-push hook. Kept only: policy reference, why pattern is loose, why scope is PR commits not history, and non-obvious CI behavior notes. No logic lines changed. Refs #4432
35 lines
1.1 KiB
Shell
Executable file
35 lines
1.1 KiB
Shell
Executable file
#!/bin/sh
|
|
# Install: ln -sf ../../scripts/pre-push .git/hooks/pre-push
|
|
#
|
|
# Runs against the full working tree (not just staged or pushed files) to match
|
|
# what CI sees: `nix flake check` builds from the committed tree.
|
|
set -eu
|
|
|
|
repo_root="$(git rev-parse --show-toplevel)"
|
|
|
|
echo "pre-push: running tracker-tag lint..." >&2
|
|
if ! sh "$repo_root/scripts/check-issue-refs.sh"; then
|
|
echo "pre-push: tracker-tag lint FAILED — fix before pushing" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "pre-push: running comment-block lint..." >&2
|
|
if ! sh "$repo_root/scripts/check-comment-blocks.sh"; then
|
|
echo "pre-push: comment-block lint FAILED — fix before pushing" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "pre-push: running doc-pointer lint..." >&2
|
|
if ! sh "$repo_root/scripts/check-doc-refs.sh"; then
|
|
echo "pre-push: doc-pointer lint FAILED — fix before pushing" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "pre-push: running attribution-trailer lint..." >&2
|
|
if ! sh "$repo_root/scripts/check-attribution-trailers.sh"; then
|
|
echo "pre-push: attribution-trailer lint FAILED — fix before pushing" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "pre-push: lints passed ✓" >&2
|
|
exit 0
|