Skip to content

Linting to reduce number of Fortitude exemptions#22

Merged
R Sharp (r-sharp) merged 9 commits intoMetOffice:mainfrom
t00sa:linting-part-1
Feb 12, 2026
Merged

Linting to reduce number of Fortitude exemptions#22
R Sharp (r-sharp) merged 9 commits intoMetOffice:mainfrom
t00sa:linting-part-1

Conversation

@t00sa
Copy link
Copy Markdown
Collaborator

@t00sa Sam Clarke-Green (t00sa) commented Feb 11, 2026

PR Summary

Code Reviewer: R Sharp (@r-sharp)

Clean up the following Fortitude failures in shumlib:

Description Code Commit
missing-intent C061 59ed1e8
initialisation-in-declaration C081 b8da5d3
use-all C121 ef778e3
unnamed-end-statement S061 77250cc
old-style-array-literal MOD011 98f9818
deprecated-relational-operator MOD021 70c49e6
interface-implicit-typing C002 2206195
missing-exit-or-cycle-label C141 8e3cbb0

Status of remaining Fortitude exemptions:

Description Justification Action
implicit-external-procedures Unimplemented Fortran 2018 feature Leave in place
assumed-size Complicated and linked with character intents Create a separate PR
assumed-size-character-intent See above Same PR as above
syntax-error Caused by preprocessor definitions Leave in place

Note: missing-exit-or-cycle-label are not picked up with Fortitude 0.7.3 - the current default for LFRic - but they are picked up by the CI testing because it uses 0.7.5.

Code Quality Checklist

(Some checks are automatically carried out via the CI pipeline)

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid undertanding and enhance the
    readability of the code
  • My changes generate no new warnings

Testing

  • I have tested this change locally, using the rose-stem suite
  • If any tests fail (rose-stem or CI) the reason is understood and
    acceptable (eg. kgo changes)
  • I have added tests to cover new functionality as appropriate (eg. system
    tests, unit tests, etc.)

Shumlib regression suite runs through cleanly:

 Test module initialized

    . : successful assert,   F : failed assert 


Testing shum_constants at Shumlib version: 2025101
................................................
Testing shum_byteswap at Shumlib version: 2025101
.................................................................
Testing shum_string_conv at Shumlib version: 2025101
..............
Testing shum_wgdos_packing at Shumlib version: 2025101
.............................................................................................
Testing shum_thread_utils at Shumlib version: 2025101
...........................................................................................
Testing shum_latlon_eq_grids at Shumlib version: 2025101
........................................................................................................................................................................
Testing shum_fieldsfile at Shumlib version: 2025101
..............................................................................
..........................................................................................................................................
.......................................................................
Testing shum_horizontal_field_interp at Shumlib version: 2025101
.......................................................
Testing shum_spiral_search at Shumlib version: 2025101
........................
Testing shum_fieldsfile_class at Shumlib version: 2025101
....................................................................
Testing f_shum_number_tools at Shumlib version: 2025101
............................................................................................
Testing shum_kinds at Shumlib version: 2025101
........

     Start of FRUIT summary: 

 SUCCESSFUL!

   No messages 
 Total asserts :           1013
 Successful    :           1013
 Failed        :              0
Successful rate:   100.00%

 Successful asserts / total asserts : [         1013 /        1013  ]
 Successful cases   / total cases   : [          113 /         113  ]
   -- end of FRUIT summary
/var/tmp/persistent/Development/shumlib/build/meto-azspce-gfortran-gcc/tests/fruit_tests_dynamic.exe

 Test module initialized

    . : successful assert,   F : failed assert 


Testing shum_constants at Shumlib version: 2025101
................................................
Testing shum_byteswap at Shumlib version: 2025101
.................................................................
Testing shum_string_conv at Shumlib version: 2025101
..............
Testing shum_wgdos_packing at Shumlib version: 2025101
.............................................................................................
Testing shum_thread_utils at Shumlib version: 2025101
...........................................................................................
Testing shum_latlon_eq_grids at Shumlib version: 2025101
........................................................................................................................................................................
Testing shum_fieldsfile at Shumlib version: 2025101
..............................................................................
..........................................................................................................................................
.......................................................................
Testing shum_horizontal_field_interp at Shumlib version: 2025101
.......................................................
Testing shum_spiral_search at Shumlib version: 2025101
........................
Testing shum_fieldsfile_class at Shumlib version: 2025101
....................................................................
Testing f_shum_number_tools at Shumlib version: 2025101
............................................................................................
Testing shum_kinds at Shumlib version: 2025101
........

     Start of FRUIT summary: 

 SUCCESSFUL!

   No messages 
 Total asserts :           1013
 Successful    :           1013
 Failed        :              0
Successful rate:   100.00%

 Successful asserts / total asserts : [         1013 /        1013  ]
 Successful cases   / total cases   : [          113 /         113  ]
   -- end of FRUIT summary

Security Considerations

  • This change does not introduce security vulnerabilities
  • I have reviewed the code for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • Performance of the code has been considered and, if applicable, suitable
    performance measurements have been conducted

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance
    of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
    Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
    Simulation Systems AI policy(including attribution labels)

Documentation

  • Where appropriate I have updated documentation related to this change and
    confirmed that it builds correctly

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

Copy link
Copy Markdown
Contributor

@r-sharp R Sharp (r-sharp) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@r-sharp R Sharp (r-sharp) merged commit aa2d7c3 into MetOffice:main Feb 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants