lint_rules.ifs_arpege_coding_standards
Implementation of rules from the IFS Arpege coding standards as GenericRule
See https://sites.ecmwf.int/docs/ifs-arpege-coding-standards/fortran for the current version of the coding standards.
Classes
|
A visitor to collects |
|
|
Calls to subroutines and functions that are provided neither by a module nor by a CONTAINS statement, must have a matching explicit interface block. |
|
Only parameters to be declared as global variables. |
- class MissingImplicitNoneRule
Bases:
GenericRule
IMPLICIT NONE
must be present in all scoping units but may be omitted in module procedures.- docs = {'id': 'L1', 'title': 'IMPLICIT NONE must figure in all scoping units. Once per module is sufficient.'}
dict
with description of the ruleTypically, this should include
"id"
and"title"
. Allows for Python’s format specification mini-language in"title"
to fill values using data fromconfig
, with the field name corresponding to the config key.
- classmethod check_for_implicit_none(ir_)
Check for intrinsic nodes that match the regex.
- classmethod check_module(module, rule_report, config)
Check for
IMPLICIT NONE
in the module’s spec.
- class OnlyParameterGlobalVarRule
Bases:
GenericRule
Only parameters to be declared as global variables.
- docs = {'id': 'L3', 'title': 'Only parameters to be declared as global variables.'}
dict
with description of the ruleTypically, this should include
"id"
and"title"
. Allows for Python’s format specification mini-language in"title"
to fill values using data fromconfig
, with the field name corresponding to the config key.
- classmethod check_module(module, rule_report, config)
Perform rule checks on module level
Must be implemented by a rule if applicable.
- class MissingIntfbRule
Bases:
GenericRule
Calls to subroutines and functions that are provided neither by a module nor by a CONTAINS statement, must have a matching explicit interface block.
- docs = {'id': 'L9', 'title': 'Explicit interface blocks required for procedures that are not imported or internal subprograms'}
dict
with description of the ruleTypically, this should include
"id"
and"title"
. Allows for Python’s format specification mini-language in"title"
to fill values using data fromconfig
, with the field name corresponding to the config key.
- classmethod check_subroutine(subroutine, rule_report, config, **kwargs)
Check all
CallStatement
andInlineCall
for a matching import or interface block.
- class MissingKindSpecifierRealLiterals
Bases:
GenericRule
…
- fixable = True
Indicator for a fixable rule that implements a corresponding
fix()
routine
- docs = {'id': 'L0', 'title': 'Real Literals must have a kind specifier. '}
dict
with description of the ruleTypically, this should include
"id"
and"title"
. Allows for Python’s format specification mini-language in"title"
to fill values using data fromconfig
, with the field name corresponding to the config key.
- classmethod check_subroutine(subroutine, rule_report, config, **kwargs)
…
- classmethod fix_subroutinei_test_2(subroutine, rule_report, config, sourcefile=None)
…
- classmethod fix_subroutine_test(subroutine, rule_report, config, sourcefile=None)
…
- classmethod fix_subroutine(subroutine, rule_report, config, sourcefile=None)
…
- classmethod fix_subroutine_working(subroutine, rule_report, config, sourcefile=None)
…