如何使 cpplint 与 Jenkins 警告插件一起工作

rv2*_*2rx 2 lint compiler-warnings jenkins cpplint

我在 Jenkins 中添加了一个“执行 shell”构建步骤来运行 cpplint.py

python /var/lib/jenkins/scripts/cpplint.py --counting=detailed `find path -name *.cpp
Run Code Online (Sandbox Code Playgroud)

我还添加了“扫描编译器警告”并添加了 CppLint。

然而,即使它在控制台输出中显示一些警告,它也总是得到 0 个警告,例如

filename.cpp:18:  Missing space after ,  [whitespace/comma] [3]
Run Code Online (Sandbox Code Playgroud)

小智 5

如果您使用 --output=vs7 运行 cpplint.py,它将生成 Jenkins 警告插件预期的格式。