ddi*_*rov 7 java gradle kotlin coverity
更新:请参阅Caleb答案中的解决方案
我正在努力让Coverity为我的构建工作,但到目前为止收效甚微.
首先是细节:
我首先从以下网址下载了一个软件包:https://scan.coverity.com/download/java/win64
然后我将bin目录添加到我的路径,转到我的项目根目录并运行以下命令.
$ set PATH=%PATH%;C:\Users\dimit\sandbox\cov-analysis\bin
$ gradlew clean
$ cov-build --dir cov-int gradlew jar
Run Code Online (Sandbox Code Playgroud)
前2个按预期进行,最后一个 - 不是那么多:
Coverity Build Capture (32-bit) version 8.7.0 on Windows 10 Professional, 64-bit (build 14393)
Internal version numbers: b452b3f2c8 p-lodi-push-28091.612
The system cannot execute the specified program.
[WARNING] Build command gradlew.bat jar exited with code 1. Please verify that the build completed successfully.
[WARNING] No files were emitted. This may be due to a problem with your configuration
or because no files were actually compiled by your build command.
Please make sure you have configured the compilers actually used in the compilation.
For more details, please look at:
C:/Users/dimit/sandbox/nuggets/cov-int/build-log.txt
Run Code Online (Sandbox Code Playgroud)
我把构建日志放在这里:https://gist.github.com/ddimtirov/9daa0e9f1f0954453f01fcec42ae2198
说明页面上的"排除构建失败"指向了一个论坛索引页面,它根本没有帮助:https://software-community-synopsys.force.com/s/#4838
接下来,我想如果我只能以其他方式生成数据,我可以将其上传到扫描服务并绕过问题.我找到了https://github.com/mjdetullio/gradle-coverity-plugin
Gradle Coverity插件发出了数据,但是当我将其压缩并上传到扫描服务时,它会清除错误电子邮件.
作为最后的手段,我尝试了TravisCI集成 - 经过几次尝试,我完成了没有错误,但它似乎没有上传任何东西......
https://travis-ci.org/ddimtirov/nuggets/builds/196307253 https://scan.coverity.com/projects/ddimtirov-nuggets?tab=overview
我接近放弃了(顺便说一句,没有在线提供的文档没有帮助)
出现此问题的原因是,使用Windows 32位工具包尝试捕获Windows 64位版本。将32位进程附加到64位进程的尝试导致执行失败。
这个问题似乎是由于Coverity的Java Capture与ErrorProne插件之间的不兼容所致,正如构建日志中的此类消息所证明的:
WARNING: Failed load class file java/io/FileNotFoundException.class as a resource using the class loader net.ltgt.gradle.errorprone.ErrorProneCompiler$SelfFirstClassLoader@36358417
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1107 次 |
| 最近记录: |