Skip to content

Fortitude 0.9 happiness#285

Merged
Matt Shin (matthewrmshin) merged 2 commits into
developfrom
bugfix/fortitude-0.9
May 21, 2026
Merged

Fortitude 0.9 happiness#285
Matt Shin (matthewrmshin) merged 2 commits into
developfrom
bugfix/fortitude-0.9

Conversation

@matthewrmshin
Copy link
Copy Markdown
Collaborator

@matthewrmshin Matt Shin (matthewrmshin) commented May 18, 2026

Should now passes fortitude check fully at fortitude 0.9.0.

Fix syntax errors manually.

Add config.

  • target-std="f2008" (fortitude default is "f2018")
  • line-length=140 (fortitude default is 102)
  • Ignore various rules in deps/ directory. (Many of which were legacy source files.)

Then ran with fortitude check --fix --unsafe-fixes.

Fix remaining failures manually.

Add fortitude check to CI.

See also:

  • JCSDA-internal/lfric-jedi#1276
  • JCSDA-internal/ops-um-jedi#269

Comment thread src/opsinputs/opsinputs_cxwriter_mod.F90
Comment thread src/opsinputs/opsinputs_varobswriter_mod.F90
Comment thread src/opsinputs/opsinputs_obsdatavector_mod.F90
@matthewrmshin
Copy link
Copy Markdown
Collaborator Author

Test failing. I'm going to reverse some of the less safe changes.

Fix syntax errors manually.

Add config.
- To target f2008.
- Ignore various rules in `deps/` directory.

Then ran with `fortitude check --fix`.

Fix remaining failures manually.
Comment thread src/opsinputs/opsinputs_obsdatavector_interface.f90 Outdated
@matthewrmshin
Copy link
Copy Markdown
Collaborator Author

Matt Shin (matthewrmshin) commented May 19, 2026

Created a new branch and blasted away the old one with a better set of changes. Tested the changes in my local environment. Now waiting for CI. All good in CI environment.

Copy link
Copy Markdown
Collaborator

@DJDavies2 David Davies (DJDavies2) left a comment

Choose a reason for hiding this comment

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

The tests pass. I am not very happy with the save and public stuff, as these are redundant and simply re-state the defaults. I know people say they like this for "clarity", but it doesn't seem useful to me: it confuses me when I see this sort of thing because i wonder why they have been stated, and if people see both

integer :: foo = 1

and

integer, save :: foo = 1

around they might start to think there is a difference between the two when there isn't.

Comment thread src/opsinputs/opsinputs_cxwriter_mod.F90
Comment thread src/opsinputs/opsinputs_mpl_mod.F90
Comment thread src/opsinputs/opsinputs_varobswriter_mod.F90
@matthewrmshin
Copy link
Copy Markdown
Collaborator Author

Note: agree that some of the declarations may be redundant, but they allow us to satisfy these rules:

@DJDavies2
Copy link
Copy Markdown
Collaborator

Note: agree that some of the declarations may be redundant, but they allow us to satisfy these rules:

* C081 https://fortitude.readthedocs.io/en/stable/rules/initialisation-in-declaration/

* C131 https://fortitude.readthedocs.io/en/stable/rules/missing-accessibility-statement/

As noted, these pages make arguments related to clarity, but I disagree with these rules.

@matthewrmshin Matt Shin (matthewrmshin) merged commit fbd5531 into develop May 21, 2026
6 checks passed
@matthewrmshin Matt Shin (matthewrmshin) deleted the bugfix/fortitude-0.9 branch May 21, 2026 08:55
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.

3 participants