forcedotcom / forcedotcom/code-analyzer

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

オープン
#2,019 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

BUG P3
主要言語
TypeScript
スター
240
フォーク
52
平均マージ
1日 23時間
マージ済み PR(30日)
5

説明

### Have you tried to resolve this issue yourself first?

- [x] 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

```shell

```

### 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

`sf code-analyzer config` コマンドから始め、提供されたコマンドと `code-analyzer.yml` を使用して問題を再現します。生成された `pmd` ルールリストを調べ、その後、`disabled: true` を持つルールを含むすべてのルールが一意のキーでアルファベット順に並べられており、再生成後もその状態が維持されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。