Skip to content

Update Codee formatter to require a space after .not. and format all files that should be formatted#733

Merged
dustinswales merged 8 commits into
NCAR:developfrom
climbfuji:feature/codee_logical_not_spaces
Apr 24, 2026
Merged

Update Codee formatter to require a space after .not. and format all files that should be formatted#733
dustinswales merged 8 commits into
NCAR:developfrom
climbfuji:feature/codee_logical_not_spaces

Conversation

@climbfuji
Copy link
Copy Markdown
Collaborator

@climbfuji climbfuji commented Apr 14, 2026

Update codee formatter to require a space after .not. and format all files that should be formatted

  1. Update .codee-format: LogicalNot: NoTrailing --> Both
  2. Format all *.F90 that should be formatted files with Codee (this excludes code to be removed in Cleanup: remove unused directories logging/* and stub/* #738 and all files under test/unit_tests as discussed below)
  3. Bump Codee to version 2026.1.2 from April 21, 2026

User interface changes?: No

Fixes #728

Testing: no changes, all pass
test removed:
unit tests:
system tests:
manual testing:

@climbfuji climbfuji changed the title Feature/codee logical not spaces Update Codee formatter to require a space after .not. and format all files that should be formatted Apr 15, 2026
@climbfuji climbfuji self-assigned this Apr 15, 2026
Comment thread test/unit_tests/sample_files/test_fortran_to_metadata.F90 Outdated
Comment thread test/unit_tests/sample_host_files/data1_mod.F90
@climbfuji climbfuji marked this pull request as ready for review April 15, 2026 02:31
@climbfuji climbfuji requested review from a team and gold2718 as code owners April 15, 2026 02:31
Copy link
Copy Markdown
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

truly one of my most annoying requests.

Comment thread .codee-format Outdated
RelationalLegacy: Both
LogicalBinary: Both
LogicalNot: NoTrailing
LogicalNot: Both
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is annoying of me since this was all originally my suggestion, but maybe this should actually be Trailing?

My nit-picky concern is that Both is resulting in lines like these:

if ( .not. thing) then

which has inconsistent parenthetical spacing. .not. is weird because sometimes it comes right after the parenthesis, but not always.

If Trailing is applied to the original code (rather than the modified code in this PR), I think it'd get at what I was looking for.

It's not really a hill I want to die on, but I imagine it'd be annoying if someone committed code like:

if (.not. thing) then

and got codee failures.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No problem, easy enough to revert.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done!

Comment thread test/unit_tests/sample_host_files/data1_mod.F90
@@ -1,5 +1,8 @@
program test
use test_prog, only: test_host, suite_info, cm, cs
use test_prog, only: test_host, &
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Note, this is a fix in Codee. The rule to break use statements into one line per module was always there, but earlier versions ignored it.

Comment thread .codee-format
RelationalLegacy: Both
LogicalBinary: Both
LogicalNot: NoTrailing
LogicalNot: Trailing
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@peverwhee Take note please

@climbfuji climbfuji requested a review from peverwhee April 23, 2026 14:25
Copy link
Copy Markdown
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

thanks @climbfuji !

Copy link
Copy Markdown
Member

@dustinswales dustinswales left a comment

Choose a reason for hiding this comment

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

This looks good to me.
I had a comment that you can take or leave.

Comment thread test/capgen_test/test_host.F90
@climbfuji
Copy link
Copy Markdown
Collaborator Author

All, I am planning to meet this by COB today. It's been out for reviews for more than two weeks, and it has approvals from NCAR and NOAA (and NAVY, obviously).

@dustinswales dustinswales merged commit 790cd9e into NCAR:develop Apr 24, 2026
15 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.

Update codee formatter to require a space after .not.

3 participants