Use dedicated OpenFOAM solver clang format to make solver compile again#499
Use dedicated OpenFOAM solver clang format to make solver compile again#499davidscn merged 4 commits intoprecice:developfrom
Conversation
MakisH
left a comment
There was a problem hiding this comment.
The code compiles, but let's also upgrade the pre-commit hook.
| AlignConsecutiveDeclarations: false | ||
| AlignEscapedNewlines: Right | ||
| # Align operands after operators (+,*,<<) (see BreakBeforeBinaryOperators) | ||
| AlignOperands: AlignAfterOperator |
There was a problem hiding this comment.
This seems to be failing for the pre-commit, which uses clang-format 8.
Let's maybe update to 11, used by the OpenFOAM adapter?
There was a problem hiding this comment.
We can certainly do that (8 is anyway a bit old). This will, however, trigger various changes in other subdirectories. In the next month, the new ubuntu LTS will be released, such that we could consider moving immediately to 14.0.0, which is the default on 22.04. Should I upgrade in a separate PR or here?
There was a problem hiding this comment.
We should make the CI succeed before merging, otherwise it will show as failing forever, until we merge again into master.
There was a problem hiding this comment.
Updating to 14.0.0 is fine, and touching more files in this PR is also fine.
MakisH
left a comment
There was a problem hiding this comment.
I have not checked if all code compiles. Feel free to merge once you are confident about that.
Takes over the clang format we have in the adapter. The default clang-format is not compatible with the way OpenFOAM code looks like. The adapter style guide is also more readable (compare e.g. the
whileloop, where the physics are solved).