forcedotcom / forcedotcom/code-analyzer
[BUG][code-analyzer] Potential PMD Issue: exclude-pattern in Referenced Ruleset Not Respected
- Dominant language
- TypeScript
- Stars
- 240
- Forks
- 52
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 5
Description
I'm encountering an issue with configuring code-analyzer to exclude files with specific prefixes. This is for a Salesforce org repository, and I'm using the PMD engine with a custom custom-ruleset.xml file. Despite specifying the prefixes to be ignored, the scanner still seems to process those files. For example I want to exclude Apex classes that have a prefix of fflib_ or TM. This is what the custom-ruleset.xml file looks like:
```
PMD ruleset that excludes fflib-related and TM-prefixed classes and their metadata files.
.*/fflib_.*\.(cls|trigger|cls-meta\.xml|trigger-meta\.xml)$
.*/fflib-.*/.*\.(cls|trigger|cls-meta\.xml|trigger-meta\.xml)$
.*/TM[^/]*\.(cls|trigger|cls-meta\.xml|trigger-meta\.xml)$
```
Do you have any suggestions on what I might be missing? Thanks in advance for your help!
Contributor guide
Assessment
This issue has not been assessed yet.