diff --git a/scripts/ci-detect-docs-only.sh b/scripts/ci-detect-docs-only.sh index 332492f21..2ca1072ea 100755 --- a/scripts/ci-detect-docs-only.sh +++ b/scripts/ci-detect-docs-only.sh @@ -72,7 +72,12 @@ case "$event" in ;; esac -changed="$(git diff --name-only "$range" 2>/dev/null || true)" +# --no-renames is load-bearing: with rename detection ON (git's default) a code->docs rename +# (e.g. Foo.cs -> docs/Foo.md) shows ONLY the destination `docs/Foo.md`, hiding that a source file +# left the build -> misclassified as docs-only -> required tests skipped on a code change. +# --no-renames surfaces the deletion (`Foo.cs`, non-docs) so it correctly forces the full matrix, +# keeping the "any code path => run everything" invariant total. +changed="$(git diff --no-renames --name-only "$range" 2>/dev/null || true)" echo "Range: $range" echo "Changed files:" printf '%s\n' "$changed"