[英]Why does cpplint not spot missing semicolons?
I have been using linters in NodeJS for a while eslint
and have started using cpplint
on my Arduino libraries in C++. 一段时间
eslint
,我一直在eslint
使用linters,并且已经开始在C ++的Arduino库中使用cpplint
。 It does not seem to pick up some fundamentals such as missing semicolons (but it does identify braces on the wrong line). 它似乎没有掌握一些基本知识,例如缺少分号(但确实在错误的行上标识了花括号)。 It also doesn't seem to differentiate between spaces and tabs for indentation or badly indented code in the implementation file.
它似乎也没有区分空格和制表符之间的缩进或实现文件中缩进的代码。
Coming from a NodeJS background, cpplint
seems to be missing a lot of checks or am I completely missing the point? 来自
cpplint
背景, cpplint
似乎缺少很多检查,还是我完全cpplint
了这一点?
cpplint
only checks code style based on Google C++ Style Guide . cpplint
仅根据Google C ++样式指南检查代码样式。 As long as I know, it won't check syntax error. 据我所知,它不会检查语法错误。 If we look on cpplint.py implementation, we won't found any rule of regex govern about missing semicolons.
如果我们查看cpplint.py的实现,我们将找不到任何有关缺少分号的正则表达式规则。 And about indentation, as long as the whitespace width is even and not tabs,
cpplint
will pass it. 关于缩进,只要空格宽度是偶数而不是制表符,
cpplint
就会通过它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.