forcedotcom / forcedotcom/code-analyzer
[Feature Request] Allow to share the scanner config file between CI/CD processes and developer environments
- Dominant language
- TypeScript
- Stars
- 240
- Forks
- 52
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 5
Description
### Need/Problem Description
As a developer, I would like to use the same scanner configuration which is used when running CI/CD processes (including same custom PMD rules) while my PMD jars containing classes required by the custom PMD rules are located in other folders than for CI/CD processes - both when using the command line as well as in Visual Studio Code.
### Describe your Desired Solution
An environment variable could be used inside the PMD classpath in code-analyzer.yml:
java_classpath_entries:
- %CUSTOM_PMD%/pmd-jars/pmd-customjar.jar
Or;
java_classpath_entries:
- %CUSTOM_PMD_JARS%
A second variable could contain the PMD rule sets to execute.
The environment variable could be set to correct values in CI/CD and for each developer machine.
While I believe that the Visual Studio Code extension does not consider the scanner configuration file (code-analyzer.yml), if that is implemented, it could consider that environment variable as well.
### Alternatives Considered
_No response_
### Additional Context (Screenshots, Files, etc)
_No response_
### Workaround
_No response_
### Urgency
Low
Contributor guide
Assessment
This issue has not been assessed yet.