Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,028 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript, yaml
Área
cli, tooling

Línea de trabajo

El punto de entrada es la configuración de la CLI de code-analyzer; empieza por rastrear cómo se analiza y aplica la configuración YAML de nivel superior ignores.files. Compara las formas solicitadas a nivel de motor y por regla, y luego define una cobertura que demuestre que la supresión de nombres de archivo puede limitarse sin afectar a otros motores o reglas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
241
Forks
51
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de forcedotcom/code-analyzer

Todos los issues de forcedotcom/code-analyzer

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.