forcedotcom / forcedotcom/code-analyzer
[BUG][code-analyzer] Potential PMD Issue: exclude-pattern in Referenced Ruleset Not Respected
- Lingua principale
- TypeScript
- Stelle
- 240
- Fork
- 52
- Merge medio
- 1g 23h
- PR unite (30g)
- 5
Descrizione
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!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo la scansione con il custom-ruleset.xml fornito e il motore PMD, verificando se le tre voci exclude-pattern vengono applicate quando si fa riferimento alle regole. L’attività è completata quando i file con i prefissi fflib_ e TM non vengono elaborati, mentre le regole Apex elencate continuano a essere eseguite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100