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条回答
【Aperson】
2楼-- · 2019-01-02 22:17

There's a list. There is also a putative C++ frontend on splint.

查看更多
冷血范
3楼-- · 2019-01-02 22:19

There is cppcheck which is supported also by Hudson via the plugin of the same name.

查看更多
女痞
4楼-- · 2019-01-02 22:20
可以哭但决不认输i
5楼-- · 2019-01-02 22:20

Check universalindentgui on sourceforge.net.

it has many style checkers for C and you can customise the checkers.

查看更多
聊天终结者
6楼-- · 2019-01-02 22:21

I'm currently working on a project with another project to write just such a tool. I looked at other static code analysis tools and decided that I could do better.

Unfortunately, the project is not yet ready to be used without fairly intimate knowledge of the code (read: it's buggy as all hell). However, we're moving fairly quickly, and hope to have a beta release within the next 8 weeks.

The project is open source - you can visit the project page, and if you want to get involved, we'd love some more external input.

I won't bore you with the details - you can visit the project page for that, but I will say one thing: Most static code analysis tools are aimed at checking your code for mistakes, and not very concerned with checking for coding guidelines. We have taken a more flexible approach that allows us to write plugiins to check for both "house rules" as well as possible bugs.

If you want any more information, please don't hesitate to contact me.

Cheers,

查看更多
做个烂人
7楼-- · 2019-01-02 22:25

The only tool I know is Vera. Haven't used it, though, so can't comment how viable it is. Demo looks promising.

查看更多
登录 后发表回答