1

I am trying to use Coverity with my .NetStandard2.1 library. using commands like:

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

After running the command getting the warning and error:

[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:/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.

I also tried to set the compiler explicitly like,

cov-configure --compiler "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\csc.exe"
jiten
  • 5,128
  • 4
  • 44
  • 73

0 Answers0