Repository navigation
check-term-links: treat a line the diff also deletes as moved, not new - #1187
Merged
Merged
Conversation
Splitting a file adds every line to new files, so the check reflagged each first use the original already carried. The sibling diff-scoped checks already exempt moved lines. Part of #1176. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6MvQvUgPePB2ndiLAgpHs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6MvQvUgPePB2ndiLAgpHs
Contributor
|
Claude finished review — View run I found no defects in this PR. I read the parser change in
One residual: a moved line that also appears elsewhere in the base is exempted by text alone. The PR accepts that trade-off and matches the I did not review the macro rules: the diff adds no math. I found no hallucinated symbols or URLs; the one external reference is gha#1176, which I did not check. VerdictReady for merge Structured Review Data (JSON){
"schema_version": "1.1",
"reviewer": "claude",
"commit_sha": "778571d81c51ab75caea0d531f0d21a24a20f2d1",
"verdict": "CLEAN",
"findings": [],
"detailed_assessment": "Traced parse_added_lines hunk-count handling, deleted-file diffs, blank lines and edited-line cases; the suite of 40 tests passes and no defect was found.",
"holistic_assessment": "The change matches the documented moved-line diff model used by sibling checks, keeps skip behavior intact, and includes docs, a changelog fragment and regression tests."
}Reviewed commit: 778571d |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splitting a file puts every line in new files, so
check-term-linksreflagged each first use the original already carried. It failed pds#244, the first of the one-div-per-subfile splits for gha#1176. The sibling diff-scoped checks (check-literal-math-letters,check-local-macros,check-fform-paren) already exempt moved lines; this adds the same exemption: an added line whose exact text, ignoring surrounding whitespace, the same diff also deletes is left out.Hunk counts now decide which diff lines are body lines, so a body line that starts with
++or--is never read as a file header.Tests: a real move between files is not flagged, an edited line that still carries the first use is, and the parser drops moved lines and ignores header-looking body lines. Replacing the exemption with
if Trueturns two of them red (test_cli_moved_line_is_not_new,test_parse_added_lines_drops_lines_the_diff_also_deletes). The 40 tests in the folder pass.The first check-term-links test here that only
git mvs a file would have passed for the wrong reason: a pure rename has no hunks, so it never reaches the parser. I replaced it with a copy plus an emptied original.The notes repos pin this check at a tag, so the fix reaches them when the tag slides.
Generated by Claude Code