问题描述
询问有关编码样式检查器的问题,但重点似乎是在压痕和支撑位置上。 GNU缩进处理缩进(在这个代码库中这不是问题,足够令人惊讶了)。
我正在处理一堆充满各种代码的代码命名方案:camelCase,小写的所有内容,underscores_as_separators,SomeStructsEndWithT等。
是否有一个很好的工具来检查C中的命名?像Python的pep8检查器工具一样,我不需要美化工具。
谢谢。
看起来像Google的(C ++样式checker)可以被黑客提交,以便像我想要的那样检查C。
(我仍然想知道是否还有更好的Checker。)
This question asks about a coding style checker, but the focus seems to be on indentation and brace placement. GNU indent deals with indentation (which isn't a problem in this code base, amazingly enough).
I'm working with a pile of code that is full of various naming schemes: camelCase, everythingruntogetherinlowercase, underscores_as_separators, SomeStructsEndWithT, etc.
I'd like to be able to pick a convention and at least have an automatic check that new changes are in line with the convention.
Is there a good tool for checking naming in C? Something like Python's pep8 checker tool, I don't want a beautifier.
Thanks.
It looks like Google's cpplint (a C++ style checker) can be hacked into submission for checking C like I want.
(I'm still interested in knowing if there any better checkers out there.)
这篇关于c的编码样式检查器(变量名,而不是缩进)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!