Preserve code comments
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
Uncle Bob says there are 'good' comments and 'bad' comments. Good comments provide important context that literal code is either not suitable or expressive enough to encapsulate. Developers benefit from these types of comments, but LLMs do too. Stripping all comments risks losing important context which the LLM needs (or which saves the LLM tokens because it doesn't need to look in six files to understand what a single line of comment already explained).
I would like it if the filter configuration was more granular so comment stripping can be switched off specifically without affecting other filters.
Alternatively, provide a comment prefix syntax to keep comments a la:
// rtk-nostrip: do not use foo.cloneAll() here since it uses a library with unstable property sorting, see open bug at http://.....
..
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the comment-stripping filter and its configuration, then compare the requested granular setting with the comment-prefix alternative; the work is done when comments can be preserved without unintentionally changing other filters and the behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100