Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Feature Request] Filename-based suppression per engine or file

Aperta
#2,028 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript, yaml
Ambito
cli, tooling

Direzione di ricerca

Il punto di ingresso è la configurazione della CLI di code-analyzer; inizia tracciando come l'impostazione YAML di primo livello ignores.files viene analizzata e applicata. Confronta le forme richieste a livello di engine e per regola, quindi definisci una copertura che dimostri che la soppressione dei nomi dei file può essere circoscritta senza influire su altri engine o regole.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
241
Fork
51
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di forcedotcom/code-analyzer

Tutte le issue di forcedotcom/code-analyzer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.