c的编码样式检查器(变量名,而不是缩进) [英] coding style checker for c (variable names, not indentation)

查看:123
本文介绍了c的编码样式检查器(变量名,而不是缩进)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题询问有关编码样式检查器的问题,但重点似乎是在压痕和支撑位置上。 GNU缩进处理缩进(在这个代码库中这不是问题,足够令人惊讶了)。



我正在处理一堆充满各种代码的代码命名方案:camelCase,小写的所有内容,underscores_as_separators,SomeStructsEndWithT等。



是否有一个很好的工具来检查C中的命名?像Python的pep8检查器工具一样,我不需要美化工具。



谢谢。

解决方案

看起来像Google的 cpplint (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的编码样式检查器(变量名,而不是缩进)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆