FP904 · ignore-comment-invalid
A `# flowpact: ignore[…]` comment names an unknown rule or one no comment can ignore, or is not written as `ignore[<rules>]`.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP904 | ignore-comment-invalid | Config & overrides | 🟡 warning | lint, check, the action, the editor |
What you see
In the ignore-comments fixture:
▲ WARN FP904 ignore-comment-invalid
Ignore comment names an unknown rule "FP5O1" (did you mean FP501?)
▶ .github/workflows/release.yml:21:74Why it matters
Such a comment accepts nothing: the finding it was written for is still reported, and the comment hides why.
How to fix
Correct the rule: its code or its name, as flowpact rules lists them, in brackets after # flowpact: ignore. The rules about overrides and ignore comments (FP9xx) check them once they are applied, so no comment can ignore them. Impact mode's rules (FP810–FP814) grade the pull request itself: only an override in the baseline's config accepts them.
Example
notify:
uses: acme/shared/.github/workflows/notify.yml@0123456789abcdef0123456789abcdef01234567 # v1.2.0 # flowpact: ignore[remote-unverifed] checked in acme/sharedScope
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:
FP904: off
# or: ignore-comment-invalid: errorExplain it in the terminal:
flowpact explain FP904Related
FP905ignore-comment-unused: A# flowpact: ignore[…]comment names a rule that reports nothing on the line it accepts.- Ignore comments