0

我想使用 cpplint.py 脚本来获取代码上的编码样式错误。我设法在 Jenkins 中执行了 python 脚本,并将输出发布到控制台日志。我想使用 cpplint 浏览器通过警告插件解析控制台日志。不幸的是,我得到以下异常:

ERROR: Publisher hudson.plugins.warnings.WarningsPublisher aborted due to exception
java.lang.NullPointerException
    at hudson.plugins.violations.util.AbsoluteFileFinder.addSourcePaths(AbsoluteFileFinder.java:20)
    at hudson.plugins.violations.types.cpplint.CppLintParser.parse(CppLintParser.java:44)
    at hudson.plugins.warnings.parser.ViolationsAdapter.parse(ViolationsAdapter.java:60)
    at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:317)
    at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:296)
    at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:293)
    at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:257)
    at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:338)
    at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
    at hudson.model.Run.run(Run.java:1433)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)

这很奇怪,因为我没有提供任何要解析的文件,而是配置了插件来解析控制台日志。我是否必须配置 cpplint 才能产生特殊的输出?还是只是插件中的错误?如果您确实需要任何进一步的信息,请询问。

谢谢你的帮助!

4

1 回答 1

0

这实际上是插件中的一个错误。将在警告插件的下一次更新中修复。

于 2012-06-21T07:46:16.603 回答