3 ms·
While Python has some great linters, I don't know of any in C that can correctly and automatically enforce some coding style. Most of them can only indent corre
by bjourne 2y ago
While Python has some great linters, I don't know of any in C that can correctly and automatically enforce some coding style. Most of them can only indent correctly, but they can't break up long lines over multiple lines, format array literals, or strings. Few or none knows how to deal with names or preprocessor macros.
- brandmeyer 2y agoclang-format and clang-tidy are both excellent for C and C++ (and protobuf, if your group uses it). Since they are based on the clang front-end, they naturally have full support for both languages and all of their complexity.