Targeted suggestion suppression
还没有人认领这个 Issue。
评估
这个 Issue 还没有评估数据。
描述
Sometimes a suggestion from Resyntax makes sense generally, but is unhelpful in a specific context. See this comment for an example. Currently, this situation requires users to repeatedly ignore Autofixer pull requests that try to fix the issue they don't care about. Usually in this situation I prefer to just get rid of the suggestion entirely, or otherwise rework it so that it only targets the high-value cases. I don't see a way to do that with the linked issue, since it's very dependent on the surrounding context.
As a last resort, Resyntax may need to provide a way to handle these sorts of issues. I can think of a few approaches:
- Make the autofixer somehow magically "just know" that a suggestion shouldn't be made because it's been made before and was disregarded.
- Add a way to annotate code that suppresses refactoring rules for that code alone, e.g.
(resyntax-suppress zero-comparison-to-positive? (some-code ...)). - Add a way to annotate packages or collections to suppress refactoring rules for that entire package or collection, e.g. in an
info.rktfile. - Add a way for refactoring rules to inspect their surrounding context, so that the
zero-comparison-to-positive?rule can see that a>or<form is being used alongside a=form like in the example from the comment above. Then that rule could silence itself in cases where it would break "visual symmetry".
- 主要语言
- Racket
- 星标
- 70
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jackfirth/resyntax 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
documentation
难度 4/5 3-5 天 新手友好度 45/100
-
testing
难度 4/5 3-5 天 新手友好度 45/100
-
testing
难度 3/5 1-2 天 新手友好度 75/100
-
testing
难度 4/5 3-5 天 新手友好度 68/100