Is there a style check for C ++?

I worked with java for a while, and I found checkstyle to be very useful. I am starting to work with C ++, and I was wondering if there is a style check function with similar functionality. I am mainly looking for the opportunity to write individual checks.

+7
c ++ coding-style checkstyle
source share
3 answers

What about Vera ++ ?

Vera ++ is a programmable tool for checking, analyzing and converting C ++ source code. Vera ++ is basically an engine that analyzes source files in C ++ and presents the result of this analysis to scripts in the form of various collections - scripts actually perform the requested tasks.

Click here to see a more complete demonstration of what he can do.

crc.hpp:157: keyword 'explicit' not followed by a single space crc.hpp:588: closing curly bracket not in the same line or column dynamic_property_map.hpp:82: keyword 'if' not followed by a single space functional.hpp:106: line is longer than 100 characters multi_index_container.hpp:472: comma should be followed by whitespace version.hpp:37: too many consecutive empty lines weak_ptr.hpp:108: keyword 'catch' not followed by a single space ... 
+3
source share

I had a good feedback about Artistic style , which allows you to apply a uniform style to the code without too much hassle.

It's free, and there are already many โ€œclassicโ€ styles. It may not work with the new C ++ 0x constructs.

I also expect the Clang library, although I have not found it to date. Usually, given the structure of Clang, this should be relatively easy, but then itโ€™s always easier to say than to code, and I think no one took the time.

+1
source share

KWStyle seems light in size

0
source share

All Articles