Skip to content

General Improvements to umdp3 checker #234

Draft
R Sharp (r-sharp) wants to merge 6 commits into
MetOffice:mainfrom
r-sharp:Improve_umdp3_checks_I
Draft

General Improvements to umdp3 checker #234
R Sharp (r-sharp) wants to merge 6 commits into
MetOffice:mainfrom
r-sharp:Improve_umdp3_checks_I

Conversation

@r-sharp
Copy link
Copy Markdown
Contributor

@r-sharp R Sharp (r-sharp) commented May 15, 2026

PR Summary

Sci/Tech Reviewer:
Code Reviewer:

Now that UMDP3 checker has been unleashed on an unsuspectin user base, some "real world" issues are arrising.
This change is intended to address the first few common ones to be highlighted...

  • False fails for uppercase variable names, especially on the assignment of logicals e.g. l_switch = .FALSE.
  • More False fails in comments at the end of variable declaration lines
  • More False fails mistaking cpp directives for Fortran statements e.g. #endif triggering "unseparated keywords" test.
  • Complaint on UMDP3 Checker #199 that the list of line numbers for error is hard to interpret.
  • Variable declaration checking doesn't account for multiple variables on one line
  • Variable declaration checking doesn't account for variables on continuation lines
  • Order of asserts in pytest tests make identifying the specific failure point in a style check hard to determine.
  • Array assignation at declaration (using "= [1, 2, 3, 4]") was triggering failures in the uppercase variable checker
  • Multiple array dimensions appears to bamboozle the fix for array dimensions (added a unit test for this)
  • The "deprecated intrinsics" check is spotting a lot of what are actually badly named variables. Particulalry "LONG"

Additional unit tests have been added to ensure the problems identified above don't creep back in.

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • This change has been tested appropriately (please describe)

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

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)

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Security considerations have been addressed
  • Performance impact is acceptable

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.

2 participants