Skip to content

LNT003 unknown-rule-in-suppression ​

warning enabled by default

An inline suppression names a rule that does not exist.

Why ​

A misspelled rule id suppresses nothing, while the comment suggests otherwise.

Reported ​

fortran
! fobis: ignore[COR999] typo

Preferred ​

fortran
! fobis: ignore[COR020] reason

Suppressing ​

For one occurrence, with the reason on the same line (or alone on the line before the statement):

fortran
! fobis: ignore[LNT003] <why this occurrence is fine>

For the whole project, ignore = LNT003 in the fobos [lint] section.