FP905 · ignore-comment-unused
A `# flowpact: ignore[…]` comment names a rule that reports nothing on the line it accepts.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP905 | ignore-comment-unused | Config & overrides | 🟡 warning | lint, check, the action, the editor |
What you see
In the ignore-comments fixture:
▲ WARN FP905 ignore-comment-unused
Ignore comment for FP108 matches no finding on line 22
▶ .github/workflows/release.yml:22:74Why it matters
The problem was fixed, or the comment is on another line than the finding. Either way it would hide a later finding of that rule there that nobody looked at.
How to fix
Delete the rule from the comment, or the comment when it names no other. A comment accepts the findings reported on its line; alone on its line, those on the next line of YAML; on a block scalar’s line (run: |), those in its text.
Example
# the workflow declares inputs.target now, so FP108 reports nothing on the next line
- run: echo "${{ inputs.target }}" # flowpact: ignore[FP108]Scope
Not reported in generated files, which are not edited by hand.
Change the severity
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP905: off
# or: ignore-comment-unused: errorExplain it in the terminal:
flowpact explain FP905Related
FP904ignore-comment-invalid: A# flowpact: ignore[…]comment names an unknown rule or one no comment can ignore, or is not written asignore[<rules>].FP902override-unused: An override matches no finding — the problem was fixed, or the target is misspelled.- Ignore comments