solidity icon indicating copy to clipboard operation
solidity copied to clipboard

update clang-format as it should now support all styles required

Open christianparpart opened this issue 3 years ago • 0 comments

Checklist

  • [x] update .clang-format
  • [x] adapt CI to verify style by using clang-format (requires version 14 or above, Ubuntu 20.04 seems to have it)
  • [x] update source files

I found a static built of clang-format here. clang-format file documentation is here.

Open question: broken up if-conditions

if (
    overlyLongExpression
)
    then();

I could not find an equivalent of this in the clang-format documentation. Dangling closing ) is definitely for other parts, but here I am uncertain.

Conditionally breaking the rules

It is possible to break the clang-format defined style by surrounding the lines with // clang-format off and a // clang-format on comment. Because it is not clear to me if we want to update the sources respectively or what parts to force as-is (that need the comments as mentioned above), I did not update the sources yet. For sake of reviewing, I could add such a commit applying .clang-format on them.

christianparpart avatar Aug 03 '22 10:08 christianparpart