Skip to content

feat: support rule-scoped finding ignores by path and line - #30

Open
wiktor7245 wants to merge 7 commits into
adnxy:mainfrom
wiktor7245:scoped-finding-ignores
Open

feat: support rule-scoped finding ignores by path and line#30
wiktor7245 wants to merge 7 commits into
adnxy:mainfrom
wiktor7245:scoped-finding-ignores

Conversation

@wiktor7245

Copy link
Copy Markdown

Summary

  • add ignoredFindings config entries scoped by ruleId and path glob
  • support optional line for location-specific suppression
  • keep other rules active in the same file and expose scoped ignores in JSON/HTML reports

Motivation

ignoredRules is global and exclude skips every rule in a file. This makes it hard to handle known false positives without hiding unrelated findings.

Example:

{
  "ignoredFindings": [
    {
      "ruleId": "SENSITIVE_LOGGING",
      "path": "src/services/**/*.ts"
    },
    {
      "ruleId": "API_KEY_EXPOSED",
      "path": "src/services/DictionariesMapper.ts",
      "line": 32
    }
  ]
}

Validation

  • npm run build
  • npm run lint
  • npm test (67/67 passing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant