Open HomesGH opened 3 weeks ago
I like that the clangformat file only has the essentials for now, I think it makes it easier for discussion purposes. In the final version, however, we should change it back into a full file.
I made the BreakBeforeBraces
style Attach
, now we will have } else {
again instead of else
on a newline.
One (potentially) controversial change I've made is PointerAlignment: Left
. We prefer Right
(I do too), but the PDF style guide says Left
, and I think that if we're following the PDF on spaces vs tabs, we should follow it here as well.
.clang-format
file back to a full config file, from a cropped oneThe CI seems to be using clangformat 14. I would vastly prefer 18, because that's what MaMiCo uses, but we can discuss that further.
We could also use git hooks to format all new files according to the clangformat, however AFAIK git hooks are not server side.
:warning: The CI detected formatting issues in this pull request. Please run clang-format locally to resolve them. Details are shown in the job log.
Description
As discussed in issue #276 , we want to add a clang-format file to enforce an unified style in ls1. For this, we have to:
.clang-format
fileCMake
to just run commandmake clang-format
for formatting (this is not working for now, help wanted!)make clang-format
for formattingIf we want to be very fancy, we could do something like in MegaMol.
Resolved Issues
I would recommend that this PR does not apply the formatting to the whole code base in ls1. This should be done in a separate PR for the sake of clarity.