Skip to content

LNT002 unused-suppression ​

warning enabled by default

An inline suppression silences nothing.

Why ​

The code it was written for has changed or moved: the stale comment now hides nothing, but would silently hide a future finding on that line. Remove it.

Reported ​

fortran
integer :: n  ! fobis: ignore[COR020] n is not initialised any more

Preferred ​

fortran
integer :: n

Suppressing ​

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

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

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