What problem does this solve?
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
What problem does this solve?
Cora currently has no line-level suppression for a finding that is a false positive or intentionally accepted.
For example,
bytesPerTokenis flagged asHardcoded password or secret in variable, even though it is a normal non-secret variable name.The available config suppression is broader:
That suppresses every finding with that title across the project.
ignore.filesexcludes 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:
For example, the
bytesPerTokenfalse positive should be suppressible without hiding unrelatedHardcoded password or secret in variablefindings elsewhere in the project.Alternatives considered
ignore.rulessuppresses every finding with the same title across the project.ignore.filessuppresses findings for an entire file.// cora-ignore,// noqa, and// eslint-disableare not currently documented or recognized by Cora.Are you willing to contribute the implementation?
Yes, if you are open to the idea.
Before submitting