You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support line-level suppression for individual findings #554
Cora currently has no line-level suppression for a finding that is a false positive or intentionally accepted.
For example, bytesPerToken is flagged as Hardcoded password or secret in variable, even though it is a normal non-secret variable name.
The available config suppression is broader:
ignore:
rules:
- "Hardcoded password or secret in variable"
That suppresses every finding with that title across the project. ignore.files excludes whole files.
Proposed solution
Add a documented, rule-scoped inline suppression marker, with syntax that works across supported languages. The exact syntax can be decided as part of implementation.
A line-level suppression should:
suppress only the selected finding at the selected location;
leave other rules on the same line and elsewhere visible;
support targeting a specific rule rather than disabling review for the whole line or file;
coexist with the existing project-wide rule and file suppressions.
For example, the bytesPerToken false positive should be suppressible without hiding unrelated Hardcoded password or secret in variable findings elsewhere in the project.
Alternatives considered
ignore.rules suppresses every finding with the same title across the project.
ignore.files suppresses findings for an entire file.
Inline markers such as // cora-ignore, // noqa, and // eslint-disable are not currently documented or recognized by Cora.
Are you willing to contribute the implementation?
Yes, if you are open to the idea.
Before submitting
I searched existing issues and didn't find a duplicate
Activity
fix(review): use ASCII lowercase when locating cora-ignore marker (#554)
feat(review): rule-scoped inline suppression via cora-ignore (#554) (#…