Skip to content

fix(filter): preserve inline comment markers - #2398

Closed
xub5210-droid wants to merge 1 commit into
rtk-ai:developfrom
xub5210-droid:fix/filter-preserve-inline-comment-markers
Closed

xub5210-droid wants to merge 1 commit into
rtk-ai:developfrom
xub5210-droid:fix/filter-preserve-inline-comment-markers

Conversation

@xub5210-droid

Copy link
Copy Markdown

Summary

  • only enter block-comment filtering when the trimmed line starts with the block marker
  • preserve valid code containing block markers in string literals or trailing comments
  • add regression coverage for inline markers and standalone block comments

Fixes #2385

AI disclosure: Codex assisted with the implementation and test.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all-targets
  • cargo test --all (2151 passed, 8 ignored)
  • Manual testing: rtk <command> output inspected

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@KuSh

KuSh commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Closing in favour of #2397, which makes the identical one line change for issue #2385, from contains to starts_with in the block comment opener, and carries wider regression coverage and a green CI run. Merging it makes this change redundant. Review and comments are very welcome on #2397, or reply here if your version covers a case it misses.

@KuSh KuSh closed this Sep 19, 2026
@KuSh KuSh added the duplicate This issue or pull request already exists label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MinimalFilter silently drops valid code lines containing // or /* anywhere in the line (contains vs starts_with)

3 participants