[BUG][code-analyzer] Disabled rules are moved to the end of the config file rules list
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- cli
Research direction
Start with the sf code-analyzer config command and reproduce the issue using the provided command and code-analyzer.yml. Inspect the generated pmd rules list, then verify that all rules, including those with disabled: true, are alphabetized by unique key and remain so after regeneration.
Written by the indexing model from the issue text.
Description
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
- Disabled a rule with
disabled: true - Run
echo 'y' | sf code-analyzer config --include-unmodified-rules --rule-selector all --config-file code-analyzer.yml --output-file code-analyzer.yml - 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)
This is actually a significant bug because changing from expected behavior will confuse people.
Workaround
No response
Urgency
Moderate
- Dominant language
- TypeScript
- Stars
- 240
- Forks
- 52
- Avg merge
- 9h 48m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from forcedotcom/code-analyzer
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
forcedotcom/code-analyzer#2094 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
forcedotcom/code-analyzer#2093 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
forcedotcom/code-analyzer#2091 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
forcedotcom/code-analyzer#2090 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
forcedotcom/code-analyzer#2099 ·
All issues in forcedotcom/code-analyzer
Similar issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Crush Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ElementsProject/cln-application#167 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100