I am looking for some tool to help with C++ like checkstyle
, which is for JAVA. It should be available for LINUX.
Are you guys aware of any?
Cppcheck is a command-line tool that tries to detect bugs that your C/C++ compiler doesn't see. It is versatile, and can check non-standard code including various compiler extensions, inline assembly code, etc. Its internal preprocessor can handle includes, macros, and several preprocessor commands.
Cppcheck is a static code analysis tool for the C and C++ programming languages. It is a versatile tool that can check non-standard code. The creator and lead developer is Daniel Marjamäki. Cppcheck.
Running Cppcheck on Selected FilesSelect Analyze > Cppcheck. In the Binary field, enter the path to the Cppcheck executable file. In the Checks group, select the checks to perform. Note: By default, Cppcheck uses multiple threads to perform checks.
--max-configs=<limit> If used together with --force, the last option is the one that is effective. By default the platform which was used to compile Cppcheck is used. Only print something when there is an error.
Cppcheck is the best free tool you are going to get. If you're willing to spend money, there are a lot of very nice other tools out there. If you want to hack up your own solution, you can do what I did for my job and hack up cpplint with any additional rules you want to add.
Vera
Astyle (Artistic Style)
Universal Indent GUI
Bcpp (C++ Beautifier)
Polystyle
Also see this question
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With