A free tool to check C/C++ source code against a s

2019-01-02 22:05发布

It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one for C/C++. I am not looking for a lint-like static code analyzer, I only would like to check against coding standards like variable naming, capitalization, spacing, identation, bracket placement, and so on.

12条回答
混吃等死
2楼-- · 2019-01-02 22:30

Try nsiqcppstyle. It's a Python based coding style checker for C/C++. It's easy to extend to add your own rules.

查看更多
3楼-- · 2019-01-02 22:31

Not exactly what you ask for, but I've found it easier to just all agree on a coding standard astyle can generate and then automate the process.

查看更多
霸刀☆藐视天下
4楼-- · 2019-01-02 22:35

Check Metrix++ http://metrixplusplus.sourceforge.net/. It may require some extensions which are specific for your needs.

查看更多
乱世女痞
5楼-- · 2019-01-02 22:37

I'm sure this could help to some degree cxx checker. Also this tool seems to be pretty good KWStyle It's from Kitware, the guys who develop Cmake.

查看更多
Bombasti
6楼-- · 2019-01-02 22:37

I have used a tool in my work its LDRA tool suite

It is used for testing the c/c++ code but it also can check against coding standards such as MISRA etc.

查看更多
做个烂人
7楼-- · 2019-01-02 22:38
登录 后发表回答