-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate clang-format limitations #6345
Comments
Note that we may want to combine clang-format with clang-tidy. Clang-tidy can make corrections for some issues, like requiring braces around statements. |
A major limitation of clang-tidy is that it can only operate on a file which can be compiled as C. In our code base, this excludes:
If we run clang-tidy, I don't see a convenient way to run it on the test suites, unless we're prepared to add |
Having compared uncrustify and clang-format, we're going with uncrustify. It's more fiddly, but on the redeeming side it's more powerful. Clang-format might be ok for checking, but it's insufficient for rewriting the current style, because we want to rearrange braces and parentheses. Clang-tidy can add braces but doesn't run on code that doesn't compile such as |
Some clang-format limitations seen in #4887 for the coding style change:
#define NAME value
with aligned values), and apparently can't be told not to.This is a time-bounded task (a couple of days tops) to investigate those limitations: can we use another tool in combination, or configure the tool differently?
The text was updated successfully, but these errors were encountered: