Skip to content

COR050 missing-accessibility-statement ​

warning enabled by default

A module has no default accessibility statement (private or public).

Why ​

Without a default the module exports everything it declares or uses, including helpers and the entities of every module it uses. Start with private and mark the API public explicitly.

Reported ​

fortran
module grid
implicit none

Preferred ​

fortran
module grid
implicit none
private
public :: grid_t

Suppressing ​

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

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

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

Equivalent ​

Fortitude rule C131 (see Lint Rules).