Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Targeted suggestion suppression

未关闭
#436 0 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

这个 Issue 还没有评估数据。

描述

autopilot-candidate enhancement existing lint

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.rkt file.
  • 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

jackfirth/resyntax 的其他 Issue

查看 jackfirth/resyntax 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。