diffblue / 2ls

Static Analyzer and Verifier
http://www.cprover.org/2LS
Other
44 stars 24 forks source link

Start using clang-format to format code #166

Closed viktormalik closed 2 years ago

viktormalik commented 2 years ago

Using .clang-format from CBMC with one tweak:

The formatting is turned off for regression tests, help, and CLI options list.

Instead of reformatting the entire codebase with clang-format, we use the git-clang-format tool to run the checks on changed lines only for each PR.

I've tested this on the array work which I'll post in a following PR, with the new style. At the moment, it's in my arrays branch (to preview the new style).

Closes #165.

viktormalik commented 2 years ago

One more idea: we could run the linter for pull requests only, to allow ignoring the hints in case they don't help readability.