Jenkins:在控制台日志上使用cpplint解析器的异常(警告插件)

时间:2012-06-01 09:21:55

标签: c++ plugins jenkins warnings lint

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

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才能生成特殊输出?或者它只是插件中的错误?如果您确实需要任何进一步的信息,请询问。

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

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