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 <path_to_source> -R <path_to_ruleset.xml> -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
- 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
- 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
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.ymlthat looks at the PMD rulesets referenced in
code-analyzer.ymland runspmd --debug check -d <path_to_source> -R <path_to_ruleset.xml> -f textor a similar command.For the ESLint config referenced in
code-analyzer.ymlit runsnpx eslint --inspect-configor 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
echo 'y' | sf code-analyzer config --include-unmodified-rules --rule-selector all --config-file code-analyzer.yml --output-file code-analyzer.ymlto regeneratecode-analyzer.ymlsf code-analyzer rules --rule-selector pmd --rule-selector eslintAdditional 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