0

我正在尝试将 Coverity 与我的 .NetStandard2.1 库一起使用。使用如下命令:

set COVERITY_PATH="C:\Users\xxx\Desktop\cov-analysis-win64-8.5.0\bin"
set PATH=%PATH%;%COVERITY_PATH%
cov-configure --cs
cov-build --dir MY_EMIT_DIR dotnet build || (echo build failed )
echo "build successfully!!"
cov-analyze --dir MY_EMIT_DIR
cov-commit-defects --dir MY_EMIT_DIR --host 10.ccc.aaa.bbb --user xxxxx --password xxxxx --stream CSProject

运行命令后得到警告和错误:

[警告] 未发出任何文件。这可能是由于您的配置有问题,或者因为您的构建命令实际上没有编译任何文件。请确保您已配置编译中实际使用的编译器。更多详情请看:C:/xxx/Src/MY_EMIT_DIR/build-log.txt

C:\xxx\Src>cov-analyze --dir MY_EMIT_DIR
Coverity Static Analysis version 8.5.0 on Windows 10 (Unknown Edition number 121), 64-bit (build 19042)
Internal version numbers: c8d197a567 p-kent-push-26368.915

Using 1 worker as limited by CPU(s)
Looking for translation units
Error: intermediate directory contains no translation units.

我还尝试明确设置编译器,例如,

cov-configure --compiler "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\csc.exe"
4

0 回答 0