rtk-ai/rtk

Preserve code comments

Open

#795 建立於 2026年3月24日

在 GitHub 查看
 (4 留言) (1 反應) (0 負責人)Rust (2,914 fork)batch import
area:configeffort-mediumenhancementfilter-qualityhelp wantedpriority:medium

倉庫指標

Star
 (48,085 star)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

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

貢獻者指南