The shared extractor now takes its per-repo taxonomy from a config file rather than CLI flags, so the wrapper shrinks to the one thing it alone knows: the repo root, which the vendored gate cannot infer because its own default resolves inside the submodule. Coverage unchanged at 23/32; the gate reports the scan as '26 (.rs under src, tests)', which is the config being read rather than defaults being guessed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
1.4 KiB
Bash
Executable File
37 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Requirement traceability gate for JRay-public-server.
|
|
#
|
|
# A thin wrapper over the shared implementation in the `jray-project` submodule.
|
|
# Everything repo-specific lives in `traceability.toml` at the repo root, so this
|
|
# script only has to point the shared gate at the right tree — and a fix to the
|
|
# gate benefits every component rather than one.
|
|
#
|
|
# scripts/traceability-gate.sh
|
|
#
|
|
# The submodule must be checked out. If `scripts/vendor/jray-project` is empty:
|
|
#
|
|
# git submodule update --init --recursive
|
|
#
|
|
# Environment (passed through):
|
|
# MIN_COVERAGE override the threshold in traceability.toml
|
|
# ALLOW_ORPHANS set to 1 to report orphan tags without failing
|
|
|
|
set -eu
|
|
|
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
REPO_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
|
VENDOR="$SCRIPT_DIR/vendor/jray-project"
|
|
|
|
if [ ! -f "$VENDOR/scripts/traceability/traceability-gate.sh" ]; then
|
|
echo "FAILED: the jray-project submodule is not checked out." >&2
|
|
echo " Run: git submodule update --init --recursive" >&2
|
|
exit 2
|
|
fi
|
|
|
|
# REPO_ROOT is the one thing the shared gate cannot infer: its own default is
|
|
# two levels above itself, which is inside the submodule once vendored. The
|
|
# taxonomy, languages and thresholds all come from traceability.toml, which the
|
|
# extractor discovers from this root.
|
|
REPO_ROOT="$REPO_ROOT" exec sh "$VENDOR/scripts/traceability/traceability-gate.sh" "$@"
|