rtk-ai/rtk

Preserve code comments

Open

#795 opened on 2026年3月24日

GitHub で見る
 (4 comments) (1 reaction) (0 assignees)Rust (2,914 forks)batch import
area:configeffort-mediumenhancementfilter-qualityhelp wantedpriority:medium

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (平均マージ 11d 1h) (30d で 45 merged PRs)

説明

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

コントリビューターガイド