fix(tools): preserve function bodies after line comments #1323

Merged
darhebkf merged 1 commit from upstream-pr/1323 into main 2026-10-09 21:42:03 +00:00
darhebkf commented 2026-10-07 23:35:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by darhebkf on 2026-10-07T23:35:07Z.


What

The checker skips a function after a line comment because DOTALL makes //.* consume its closing brace. Restrict line comments to their line. Include functional parser and CLI regressions under a distinct filename and register them with CTest. The trusted Conventions workflow is unchanged.

Tested

Rebased onto main d70b8998. macOS 15.7.3, Apple Silicon, AppleClang 17, Python 3.14.6. The relinker-only Release build passed all 39 CTest groups on this branch, including seven checker regressions. The checker group took 0.28 s locally.

The shared upstream C++ relinker sources were built in Release during this review; subsequent tool-only branches ran their affected CTest groups. Conventions and whitespace checks pass for each branch. Full Linux/Windows runtime validation requires a maintainer-dispatched Build run; no title or homebrew was executed.

Checklist

  • Based on current main; no other open PR implements the same fix.
  • One topic per PR; this remains the same fix with its regression tests.
  • No source comments added; comment text in test fixtures is string data.
  • Unimplemented paths throw; no runtime exports or silent stubs added.
  • No notes, investigation files or images added to the repository.
  • No new third-party code.
  • Generic behaviour, not specific to one title.
  • New test groups finish well below 30 s locally; CI-runner timings remain unverified.
  • Depends on: none.
  • AI-assisted: yes.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779765931 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1323). Originally posted by [darhebkf](https://github.com/darhebkf) on 2026-10-07T23:35:07Z. --- ### What The checker skips a function after a line comment because DOTALL makes `//.*` consume its closing brace. Restrict line comments to their line. Include functional parser and CLI regressions under a distinct filename and register them with CTest. The trusted Conventions workflow is unchanged. ### Tested Rebased onto main `d70b8998`. macOS 15.7.3, Apple Silicon, AppleClang 17, Python 3.14.6. The relinker-only Release build passed all 39 CTest groups on this branch, including seven checker regressions. The checker group took 0.28 s locally. The shared upstream C++ relinker sources were built in Release during this review; subsequent tool-only branches ran their affected CTest groups. Conventions and whitespace checks pass for each branch. Full Linux/Windows runtime validation requires a maintainer-dispatched Build run; no title or homebrew was executed. ### Checklist - [x] Based on current `main`; no other open PR implements the same fix. - [x] One topic per PR; this remains the same fix with its regression tests. - [x] No source comments added; comment text in test fixtures is string data. - [x] Unimplemented paths throw; no runtime exports or silent stubs added. - [x] No notes, investigation files or images added to the repository. - [x] No new third-party code. - [x] Generic behaviour, not specific to one title. - [x] New test groups finish well below 30 s locally; CI-runner timings remain unverified. - [x] Depends on: none. - [x] AI-assisted: yes.
github-actions[bot] commented 2026-10-08 12:38:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T12:38:32Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1569 tools/tests/test_check_conventions.py tools/tests/test_check_conventions.py
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6060042685 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1323#issuecomment-6060042685). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T12:38:32Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1569 | `tools/tests/test_check_conventions.py` | | `tools/tests/test_check_conventions.py` |
rmz-24 commented 2026-10-09 13:10:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rmz-24 on 2026-10-09T13:10:22Z.


Windows run (Windows 11 Pro 25H2, Python 3.14), a00559a2 cherry-picked onto main d70b8998:

  • tools/tests/test_check_conventions_comments.py: passes.
  • With tools/check_conventions.py reset to main and the new tests kept: FAILED (failures=6), so the tests catch what the change fixes.
  • tools/check_conventions.py --base upstream/main with this change passes on Windows.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6081549330 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1323#issuecomment-6081549330). Originally posted by [rmz-24](https://github.com/rmz-24) on 2026-10-09T13:10:22Z. --- Windows run (Windows 11 Pro 25H2, Python 3.14), a00559a2 cherry-picked onto `main` d70b8998: - `tools/tests/test_check_conventions_comments.py`: passes. - With `tools/check_conventions.py` reset to `main` and the new tests kept: `FAILED (failures=6)`, so the tests catch what the change fixes. - `tools/check_conventions.py --base upstream/main` with this change passes on Windows. AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1323
No description provided.