简体   繁体   English

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

[英]Jenkins: exception using cpplint parser on console log (warnings plugin)

I want to use the cpplint.py script to get coding style errors on the code. 我想使用cpplint.py脚本获取代码上的编码样式错误。 I managed to execute the python script in Jenkins and it posts the output to the console log. 我设法在Jenkins中执行python脚本,并将其输出到控制台日志。 I want to parse the console log via the warnings plugin using the cpplint browser. 我想使用cpplint浏览器通过警告插件解析控制台日志。 Unfortunately, I get the following exception: 不幸的是,我得到以下异常:

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)

This is curious, as I don't provide any file to parse but have configured the plugin to parse the console log. 这很好奇,因为我没有提供任何要解析的文件,但已将插件配置为解析控制台日志。 Do I have to configure cpplint to produce a special output? 我是否必须配置cpplint才能产生特殊输出? Or is it just an error in the plugin? 还是仅仅是插件中的错误? If you do need any further information, please ask. 如果您确实需要更多信息,请询问。

Thanks for your help! 谢谢你的帮助!

This was actually a bug in the plugin. 这实际上是插件中的错误。 Will be fixed in the next update of the warnings plugin. 将在警告插件的下一个更新中修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM