forcedotcom / forcedotcom/code-analyzer

[Feature Request] Config check CLI commands for external config files

オープン
#2,029 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
240
フォーク
52
平均マージ
1日 23時間
マージ済み PR(30日)
5

説明

### Product Area

The "code-analyzer" CLI

### Your Need or Problem

Currently, when I recreate my config file (after modifying my custom PMD ruleset), it gives an error if my PMD file has a problem.

This is good.

However, it would be BETTER if I could run a code-analyzer command that would validate my PMD files that are mentioned in my config file WITHOUT regenerating my config file. It would just be simpler while I'm updating things. Then I would, of course, have to redo the config command.

### Your Desired Solution

Please add a command

`sf code-analyzer config check --engine pmd,eslint --config-file code-analyzer.yml`

that looks at the PMD rulesets referenced in `code-analyzer.yml` and runs `pmd --debug check -d -R -f text` or a similar command.

For the ESLint config referenced in `code-analyzer.yml` it runs `npx eslint --inspect-config` or a similar command.

I **know** that rulesets/configs are validated when listing rules, but I don't want any output beyond "Your config file is valid" or "These are the problems in your config file" for this request.

### Alternatives Considered

1. Run `echo 'y' | sf code-analyzer config --include-unmodified-rules --rule-selector all --config-file code-analyzer.yml --output-file code-analyzer.yml` to regenerate `code-analyzer.yml`
2. Run `sf code-analyzer rules --rule-selector pmd --rule-selector eslint`

### Additional Context (Screenshots, Files, etc)

_No response_

### Workaround

I can do what I want within other commands, but breaking it out would speed some work.

### Urgency

Low

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

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

調査の方向性

code-analyzer CLI の既存の config コマンドと config-file の処理から始め、ルールを再生成または一覧表示するときに PMD rulesets と ESLint configs が現在どのように検証されているかを比較します。config check コマンドが指定されたオプションを受け付け、選択された engines について有効性または設定の問題だけを報告すれば完了です。

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

評価

技術スタック
eslint, typescript
領域
cli, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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