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

[BUG][code-analyzer] Disabled rules are moved to the end of the config file rules list

未关闭
#2,019 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
typescript
领域
cli

调研方向

从 sf code-analyzer config 命令开始,使用提供的命令和 code-analyzer.yml 重现该问题。检查生成的 pmd 规则列表,然后验证所有规则(包括具有 disabled: true 的规则)是否都按唯一键的字母顺序排列,并且在重新生成后仍保持该顺序。

由索引模型根据 Issue 内容生成。

描述

BUG P3
Have you tried to resolve this issue yourself first?
  • I confirm I have gone through the above steps and still have an issue to report.
Bug Description

I disabled some rules and recreated the config file. ( see #2013 )

All the disabled rules were moved to the end of the pmd section.

But I want to view ALL the PMD rules alphabetized so I know which ones are in there.

Output / Logs

Steps To Reproduce
  1. Disabled a rule with disabled: true
  2. Run echo 'y' | sf code-analyzer config --include-unmodified-rules --rule-selector all --config-file code-analyzer.yml --output-file code-analyzer.yml
  3. See that the disabled rules are moved.
Expected Behavior

All rules should be alphabetized by their unique key. This extra sort doesn't help anything and only can confuse people.

Operating System

macOS

Salesforce CLI Version

@salesforce/cli/2.128.5 darwin-arm64 node-v22.22.1

Code Analyzer Plugin (code-analyzer) Version

5.11.1

Node Version

No response

Java Version

No response

Python Version

No response

Additional Context (Screenshots, Files, etc)
Image

This is actually a significant bug because changing from expected behavior will confuse people.

Workaround

No response

Urgency

Moderate

主要语言
TypeScript
星标
240
派生
52
平均合并
9 小时 48 分钟
30 天内合并 PR
3

贡献指南

打开贡献指南

从这里开始

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

forcedotcom/code-analyzer 的其他 Issue

查看 forcedotcom/code-analyzer 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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