Adding fortitude rules 1#370
Open
mo-lucy-gordon wants to merge 7 commits into
Open
Conversation
Matthew Hambley (MatthewHambley)
approved these changes
May 19, 2026
Collaborator
Matthew Hambley (MatthewHambley)
left a comment
There was a problem hiding this comment.
Code Owner Review: Looks good to me.
Thomas Bendall (tommbendall)
approved these changes
May 20, 2026
Contributor
Thomas Bendall (tommbendall)
left a comment
There was a problem hiding this comment.
No objections from me -- this all looks positive! I haven't worked through all of the rules but hoping I'll generally agree with them when I encounter them!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Sci/Tech Reviewer: Andrew Coughtrie (@andrewcoughtrie)
Code Reviewer: Pierre Siddall (@Pierre-siddall)
I have added rules to a fortitude configuration file so that more checks are run on the code. This will reduce the amount of new style issues getting onto the trunks.
N.B. Although these fortitude tests being added passed before submission for review, any new additions to the trunk after that may cause fortitude errors, so those will be need to be fixed by me/the developer while the trunk is reserved for this ticket to be committed.
There are lots of exceptions (check.per-file-ignores) listed in the configuration files which stop certain files being tested with certain rules, so the tests all pass. Some style issues have been fixed in this ticket but the rest of these style issues can be fixed in batches with proceeding tickets.
Here is a full list of the rules added and what they check for:
#E000 io-error
#E001 syntax-error
#C001 missing implicit none,
#C021 real literal missing kind suffix
#C022 implicit-real-kind
#C031 magic-number-in-array-size
#C032 magic unit in IO statement
#C043 missing-action-specifier
#C051 trailing-backslash
#C071 assumed-size
#C072 character has assumed size but does not have intent(in)
#C081 initialisation-in-declaration
#C091 external-procedure
#C082 pointer-initialisation-in-declaration
#C092 procedure-not-in-module
#C121 use-all
#C132 default-public-accessibility
#C141 missing-exit-or-cycle-label
#OB011 common-block
#OB021 entry-statement
#OB051 pause-statement
#OB061 deprecated-character-syntax
#MOD001 double-precision
#MOD021 deprecated-relational-operator
#S101 trailing-whitespace
#S071 missing-double-colon
#PORT011 literal-kind
#PORT012 literal-kind-suffix
#PORT021 star-kind
#FORT001 invalid-rule-code-or-name
#FORT002 unused-allow-comment
#FORT003 redirected-allow-comment
#FORT004 duplicated-allow-comment
#FORT005 disabled-allow-comment
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_core - lc_add_r1/run10
Suite Information
Task Information
✅ succeeded tasks - 402
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review