Add more break points for long lines#727
Conversation
|
@climbfuji, The latest Codee failure seems to be a mismatch between the default settings of the Note, linebreak_test.F90 now compiles with no warnings so this is just a formatting issue. |
|
Another Codee comment. While I can match most of Codee's formatting expectations by setting Ironically, if capgen had been generating Codee-approved Fortran, @jimmielin would never have seen the bug he reported in #724 🤷. |
We had a similar issue with another test (#722; comment #722 (comment)). If you want to preserve formatting for certain parts of the code, you can wrap those lines in See c221aaf |
| name079, name080, name081, name082, name083, name084, name085, name086, name087, & | ||
| name088, name089, name090, name091, name092, name093, name094, name095, name096, & | ||
| name097, name098, name099 /) | ||
| character(len=7) :: data(100) = (/ 'name000', 'name001', 'name002', 'name003', 'name004', & |
There was a problem hiding this comment.
| character(len=7) :: data(100) = (/ 'name000', 'name001', 'name002', 'name003', 'name004', & | |
| ! codee format off | |
| character(len=7) :: data(100) = (/ 'name000', 'name001', 'name002', 'name003', 'name004', & |
| 'Cannot read columns_on_task from file'// & | ||
| ', columns_on_task has no horizontal dimension; columns_on_task is a protected variable' | ||
|
|
||
| end subroutine foo |
There was a problem hiding this comment.
| end subroutine foo | |
| end subroutine foo | |
| ! codee format on |
Add missing spaces in host cap (for Codee).
|
I managed to fix the Fortran writer to pass these tests. The two sections that are Codee commented out are purposefully bad Fortran lines to make sure the writer can still break them legally. While #732 avoids the previous problems with this PR, I think the new version helps move the Fortran writer closer to being Codee compliant. |
I agree. I propose to merge #727 and then update #732 to make the list of excluded files in the GitHub workflow an empty list for now. It's nice to have the capability to exclude individual files entirely. |
mkavulich
left a comment
There was a problem hiding this comment.
LGTM. @climbfuji I assume we can go ahead and merge this PR then?
This sounds like a good idea although aside from testing line breaking, I can't think of any reasons we would want to generate non-compliant code. |
One reason that we are hitting with the NEPTUNE code base is not related to non-compliant code, but to bugs that we identified in the Codee formatter itself. We report those back and the team needs a bit of time to fix them and release a new version. In the meantime, we exclude those files from formatting. |
Yes please |
…ing in GitHub actions (#732) ## Description This PR adds the capability to exclude individual Fortran files from Codee formatting in GitHub actions. This was originally motivated by issues with making the Fortran writer Codee compliant (PR #727). These issues were resolved, but there are scenarios were excluding individual files from Codee formatting checks may be needed (see comments in #727). User interface changes?: No ## Issues N/A ## Testing Testing: **all pass** (only updates to existing tests, no new tests, no tests removed) ## Additional information See comments in #727 --------- Co-authored-by: Steve Goldhaber <gold2718@gmail.com> Co-authored-by: Haipeng Lin <hplin@ucar.edu>
Some long lines are still broken incorrectly
Some long lines are still broken into invalid Fortran. This PR addresses this by adding more non-ID characters to the allowed break points (currently only spaces and commas).
User interface changes?: No
Fixes: TBA
Testing:
test removed:
unit tests:
system tests:
manual testing: