[Feature Request] Filename-based suppression per engine or file
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- typescript, yaml
Rechercherichtung
Der Einstiegspunkt ist die CLI-Konfiguration von code-analyzer. Beginne damit nachzuverfolgen, wie die YAML-Einstellung ignores.files auf oberster Ebene geparst und angewendet wird. Vergleiche die angeforderten Formen auf Engine-Ebene und pro Regel und definiere anschließend eine Abdeckung, die zeigt, dass die Unterdrückung von Dateinamen eingeschränkt werden kann, ohne andere Engines oder Regeln zu beeinflussen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Product Area
The "code-analyzer" CLI
Your Need or Problem
I like the
ignores:
files:
- "**/utils.js"
feature.
Currently, it exists at the top level, meaning we can only exclude filenames for all engines. I would like to exclude at the engine or file level.
The background: Salesforce provides some stock/standard files (JavaScript, Visualforce, Aura, LWC) that have rule violations in them. Instead of having to fix them all when importing starter metadata, I want to exclude them... but I would like to do that from the config file.
IDEALLY, I could do a suppression PER RULE, but I fear that is too much to ask.
This is resulting in a LOT of false-positives and noise, and is stopping our pipeline every time we create a new kind of Experience Cloud site.
Your Desired Solution
engines:
pmd:
ignores:
- "selfRegister.cmp"
- "CommunityTemplate.page"
or
rules:
pmd:
"LoadCSSApexStylesheet":
severity: 2
ignores:
- "CommunityTemplate.page"
tags:
- AppExchange
- Security
- Visualforce
My vision for using Code Analyzer is that I have a standard config file I use for all my projects as a starting point, and that one would include suppressing checks on those files. I could load that as a default in each of my repos/projects.
Alternatives Considered
PMD doesn't have a robust "ignore this rule for this filepath" from the ruleset feature, so I know I'm asking for a lot here.
I can exclude files in my custom ruleset, but that only applies to pmd rules.
I can override the specific rule and make a very long XPath exception property, which works, and might be good for some files, but isn't ideal.
Additional Context (Screenshots, Files, etc)
No response
Workaround
I have been able to suppress for most files (not JavaScript) by editing the file. But I don't want to have to edit each default file as Salesforce creates them.
Urgency
Moderate
- Vorherrschende Sprache
- TypeScript
- Sterne
- 240
- Forks
- 52
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus forcedotcom/code-analyzer
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
forcedotcom/code-analyzer#2094 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
forcedotcom/code-analyzer#2093 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
forcedotcom/code-analyzer#2091 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
forcedotcom/code-analyzer#2090 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
forcedotcom/code-analyzer#2100 ·
Alle Issues in forcedotcom/code-analyzer
Ähnliche Issues
-
area/frontend good first issue kind/cooldown
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
voidzero-dev/oxc-angular-compiler#511 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
langchain-ai/deepagentsjs#898 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
anomalyco/models.dev#8509 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug documentation P2 UI/UX
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag