Skip to content

Rules

Legend

    ✔️     The rule is stable.
    🧪     The rule is unstable and is in "preview".
    ⚠️     The rule has been deprecated and will be removed in a future release.
    ❌     The rule has been removed only the documentation is available.
    🛠️     The rule is automatically fixable by the --fix command-line option.
    ▶️     The rule is turned on by default.
    ⏸️     The rule is turned off by default.

Error (E)

Code Name Message
E000 io-error {message} ✔️ ▶️
E001 syntax-error Syntax error ✔️ ▶️
E011 invalid-character Invalid character '{character}' ✔️ ▶️

Correctness (C)

Code Name Message
C001 implicit-typing {entity} uses implicit typing ✔️ 🛠️ ▶️
C002 interface-implicit-typing interface '{name}' uses implicit typing ✔️ 🛠️ ▶️
C003 implicit-external-procedures 'implicit none' missing 'external' ✔️ ▶️
C011 missing-default-case Missing default case may not handle all values ✔️ ▶️
C021 no-real-suffix real literal {literal} missing kind suffix ✔️ ⏸️
C022 implicit-real-kind {dtype} has implicit kind ✔️ ⏸️
C031 magic-number-in-array-size Magic number in array size, consider replacing {value} with named parameter ✔️ ⏸️
C032 magic-io-unit Magic unit '{value}' in IO statement ✔️ ⏸️
C043 missing-action-specifier file opened without action specifier ✔️ ⏸️
C051 trailing-backslash Trailing backslash ✔️ ▶️
C061 missing-intent {entity} argument '{name}' missing 'intent' attribute ✔️ ▶️
C071 assumed-size '{name}' has assumed size ✔️ ▶️
C072 assumed-size-character-intent character '{name}' has assumed size but does not have intent(in) ✔️ ▶️
C081 initialisation-in-declaration '{name}' is initialised in its declaration and has no explicit save or parameter attribute ✔️ ▶️
C082 pointer-initialisation-in-declaration Pointer '{name}' is initialized in its declaration and has no explicit save attribute ✔️ ▶️
C091 external-procedure '{name}' declared as external ✔️ ▶️
C092 procedure-not-in-module {procedure} not contained within (sub)module or program ✔️ ▶️
C101 missing-default-pointer-initalisation pointer component '{var}' does not have a default initialiser ✔️ ▶️
C121 use-all 'use' statement missing 'only' clause ✔️ ▶️
C122 missing-intrinsic 'use' for intrinsic module missing 'intrinsic' modifier ✔️ ▶️
C131 missing-accessibility-statement module '{}' missing default accessibility statement ✔️ ▶️
C132 default-public-accessibility module '{}' has default public accessibility ✔️ ⏸️
C141 missing-exit-or-cycle-label '{name}' statement in named 'do' loop missing label '{label}' ✔️ 🛠️ ▶️
C142 exit-or-cycle-in-unlabelled-loop '{name}' statement in unlabelled 'do' loop ✔️ ⏸️
C143 missing-end-label '{end_name}' statement in named '{start_name}' block missing label ✔️ 🛠️ ▶️
C151 misleading-inline-if-semicolon Semicolon following inline if-statement is misleading ✔️ 🛠️ ▶️
C152 misleading-inline-if-continuation Line continuation in inline if-statement is misleading ✔️ 🛠️ ▶️
C161 nonportable-shortcircuit-inquiry variable inquiry {function}({arg}) and use in same logical expression ✔️ ▶️
C171 split-escaped-quote line continuation in split escaped quote looks like implicit concatenation ✔️ 🛠️ ⏸️
C181 unchecked-stat {stat} argument '{name}' is {check_status} in this scope. ✔️ ▶️
C182 multiple-allocations-with-stat 'stat' parameter used with multiple {allocations}. ✔️ ▶️
C183 stat-without-message '{stat}' used without '{errmsg}'. ✔️ ⏸️
C191 unreachable-statement code following {} is unreachable ✔️ ▶️

Obsolescent (OB)

Code Name Message
OB001 statement-function statement functions are obsolescent, prefer internal functions ▶️
OB011 common-block common blocks are obsolescent, prefer modules or derived types ✔️ ▶️
OB012 equivalence-statement equivalence is obsolete and should not be used 🧪 ▶️
OB013 block-data-construct block data is obsolescent, use a module instead 🧪 ▶️
OB021 entry-statement entry statements are obsolescent, use module procedures with generic interface ✔️ ▶️
OB031 specific-name deprecated type-specific function '{func}' ✔️ ▶️
OB041 computed-go-to computed go to statements are obsolescent, use a select case statement ✔️ ▶️
OB051 pause-statement pause statements are a deleted feature ✔️ ▶️
OB061 deprecated-character-syntax '{original}' uses deprecated syntax ✔️ 🛠️ ▶️
OB071 forall-statement forall statements are obsolescent in F2018, prefer do concurrent instead 🧪 ▶️
OB081 arithmetic-if Obsolete arithmetic if 🧪 🛠️ ▶️
OB091 labelled-do-loop Obsolescent labelled do loop 🧪 🛠️ ▶️
OB092 shared-do-termination Shared do loop termination 🧪 🛠️ ▶️
OB093 bad-do-termination do termination is not end do or continue 🧪 🛠️ ▶️
OB094 goto-end-do goto points to end do 🧪 🛠️ ▶️
OB201 deprecated-mpi-include mpif.h include is deprecated, use mpi or mpi_f08 module instead ✔️ ▶️
OB211 deprecated-omp-include omp_lib.h include is deprecated, use the omp_lib module instead ✔️ ▶️

Modernisation (MOD)

Code Name Message
MOD001 double-precision Use of '{original}' is discouraged ✔️ ⏸️
MOD002 double-precision-literal Use of 'd' exponentiation in '{original}' is discouraged ✔️ ⏸️
MOD011 old-style-array-literal Array literal uses old-style syntax: prefer [...] ✔️ 🛠️ ▶️
MOD021 deprecated-relational-operator deprecated relational operator '{symbol}', prefer '{new_symbol}' instead ✔️ 🛠️ ▶️
MOD031 include-statement Include statement is deprecated, use modules instead ✔️ ⏸️
MOD041 out-of-line-attribute Out of line '{attribute}' attribute for variable '{variable}' ✔️ 🛠️ ▶️
MOD051 superfluous-save save {} is superfluous at the module level 🧪 🛠️ ▶️
MOD201 old-mpi-module Use of mpi module discouraged, use mpi_f08 instead ✔️ ⏸️

Style (S)

Code Name Message
S001 line-too-long line length of {actual_length}, exceeds maximum {max_length} ✔️ ▶️
S002 missing-newline-at-end-of-file missing newline at end of file ✔️ 🛠️ ▶️
S061 unnamed-end-statement end statement should be named. ✔️ 🛠️ ▶️
S071 missing-double-colon variable declaration missing '::' ✔️ 🛠️ ▶️
S081 superfluous-semicolon unnecessary semicolon ✔️ 🛠️ ▶️
S082 multiple-statements-per-line multiple statements per line ✔️ 🛠️ ⏸️
S091 non-standard-file-extension file extension should be '.f90' or '.F90' ✔️ ▶️
S101 trailing-whitespace trailing whitespace ✔️ 🛠️ ▶️
S102 incorrect-space-before-comment need at least 2 spaces before inline comment ✔️ 🛠️ ⏸️
S103 incorrect-space-around-double-colon Missing space around :: ✔️ 🛠️ ⏸️
S104 incorrect-space-between-brackets Should be 0 space after the opening bracket ✔️ 🛠️ ⏸️
S201 superfluous-implicit-none 'implicit none' set on the enclosing {entity} ✔️ 🛠️ ⏸️
S211 multiple-modules Multiple modules in one file, split into one module per file ✔️ ⏸️
S212 program-with-module Program and module in one file, split into their own files ✔️ ⏸️
S221 function-missing-result Function missing result() specifier ✔️ ⏸️
S231 keywords-missing-space Missing space in '{keywords}' ✔️ 🛠️ ▶️
S232 keyword-has-whitespace Whitespace included in '{keywords}' ✔️ 🛠️ ▶️
S233 incorrect-keyword-case Keyword '{actual}' should be '{expected}' 🧪 🛠️ ▶️
S241 bad-quote-string String uses single quotes but double quotes preferred ✔️ 🛠️ ▶️
S242 avoidable-escaped-quote Avoidable escaped quotes ✔️ 🛠️ ⏸️
S251 useless-return useless return statement` ✔️ 🛠️ ⏸️
S252 superfluous-else-return Unnecessary {branch} after return statement ✔️ 🛠️ ⏸️
S253 superfluous-else-cycle Unnecessary {branch} after cycle statement ✔️ 🛠️ ⏸️
S254 superfluous-else-exit Unnecessary {branch} after exit statement ✔️ 🛠️ ⏸️
S255 superfluous-else-stop Unnecessary {branch} after {stop} statement ✔️ 🛠️ ⏸️
S261 inconsistent-array-declaration Inconsistent specification of dimension ✔️ 🛠️ ▶️
S262 mixed-scalar-array-declaration Mixed declaration of scalar(s) and array ✔️ 🛠️ ⏸️
S263 bad-array-declaration Bad declaration of array ✔️ 🛠️ ⏸️
S271 unsorted-uses use statements are not sorted 🧪 🛠️ ▶️
S291 bare-decimal {trailing} decimal point in real literal {literal} 🧪 🛠️ ▶️
S901 too-complex cyclomatic complexity of {actual_complexity}, exceeds maximum {max_complexity} 🧪 ⏸️
S902 too-many-arguments Too many arguments in procedure {procedure_name} ({arg_count} > {max_args}) 🧪 ⏸️

Portability (PORT)

Code Name Message
PORT001 non-portable-io-unit Non-portable unit '{value}' in '{kind}' statement ✔️ ⏸️
PORT011 literal-kind {dtype} kind set with number literal '{literal}' ✔️ ▶️
PORT012 literal-kind-suffix '{literal}' has literal kind suffix '{suffix}' ✔️ ▶️
PORT021 star-kind '{dtype}{size}' uses non-standard syntax ✔️ 🛠️ ▶️
PORT031 invalid-tab Invalid tab character ✔️ 🛠️ ▶️

Fortitude (FORT)

Code Name Message
FORT001 invalid-rule-code-or-name Unknown rule or code {rule} in allow comment ✔️ ▶️
FORT002 unused-allow-comment Unused rule {rule} in allow comment ✔️ 🛠️ ▶️
FORT003 redirected-allow-comment {original} has been redirected to '{redirect}' ✔️ 🛠️ ▶️
FORT004 duplicated-allow-comment Duplicated rule {rule} in allow comment ✔️ 🛠️ ▶️
FORT005 disabled-allow-comment Disabled rule {rule} in allow comment ✔️ 🛠️ ▶️