Repository navigation
fix(conventions): ignore non-code duplicate export matches - #5780
oneandonlydean merged 1 commit into
Conversation
adriadam10
left a comment
There was a problem hiding this comment.
The approach looks right: cpp_text keeps newlines, so line numbers still match git grep, and the new cases in tools/tests/test_check_conventions_wrapped_declarations.py pass on this head (9 tests).
One blocker: the PR conflicts with main in tools/check_conventions.py. duplicates() on main now reads blobs in one batch (self.read(...) and hits), so the masking has to be re-applied on top of that loop. I can't push a rebase to your branch (maintainer edits are disabled), so please rebase and re-run the five convention suites, plus the negative control against main's checker.
1421354 to
89db679
Compare
|
@adriadam10 Rebased onto main Fresh macOS 27.0.1 arm64 / Python 3.12.14 checks:
The description now records the fresh results. Manually reviewed the bot's remaining shared checker patches: #6078's environment rule and #6268's Unknown-NID rule do not implement this masking; no combined-tree test is claimed. #5766 is already merged in the new base. AI-assisted: yes (OpenAI Codex). |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
89db679 to
26c3a82
Compare
|
Picking this up while @adriadam10 is away: we will merge it once full CI and an independent review pass on this head. |
Stale: the requested change is in place on 26c3a82 (checked while @adriadam10 is away).
What
The duplicate-export checker can match an
APS5_VABIdeclaration inside a comment or string and report a real export as a duplicate. Mask non-code tokens before matching each source line and inspecting its function body. Keep line numbers intact, including Unicode separators, and cache the masked source per file.The branch is based on main
47a266cf975f00f7fba94013467d03bfa5e355e9. The masking is applied inside main's existinghitsloop after its batchedself.read(...); the batch-read behavior is retained.Tested
macOS 27.0.1 arm64, Python 3.12.14: all 109 tests in the convention suites pass, including batched-read coverage and all 10 wrapped-declaration cases. The 10 wrapped-declaration cases also pass on Python 3.9.6.
Negative control: with unchanged main's checker and this branch's tests, 5 wrapped-declaration cases fail and 5 pass. The failures reproduce the comment, raw-string and source-line bugs that this change fixes. The trusted main checker accepts the committed patch, title and template; whitespace checks pass. No runtime or GPU behavior changes.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository