rtk-ai/rtk

Preserve code comments

Open

#795 geöffnet am 24. März 2026

Auf GitHub ansehen
 (4 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:configeffort-mediumenhancementfilter-qualityhelp wantedpriority:medium

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

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://.....
..

Image

Contributor Guide