简体   繁体   English

Coverity是否支持xbuild(单声道)?

[英]Does Coverity support xbuild (mono)?

I've a C# project: https://github.com/Pro/dkim-exchange 我有一个C#项目: https//github.com/Pro/dkim-exchange

It uses Travis CI: https://travis-ci.org/Pro/dkim-exchange 它使用Travis CI: https//travis-ci.org/Pro/dkim-exchange

Travis successfully builds my project. 特拉维斯成功建立了我的项目。

I wanted to set up Coverity to do automatic code quality measurements. 我想设置Coverity来进行自动代码质量测量。 For this I configured my .travis.yml as follows: 为此我配置了我的.travis.yml如下:

language: objective-c

env:
  global:
    - EnableNuGetPackageRestore=true
    # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
    #   via the "travis encrypt" command using the project repo's public key
    - secure: "kC7O0CWm9h4g+tzCwhIZEGwcdiLrb1/1PijeOKGbIWGuWS7cIksAkj2tRNMgtxxcE9CFQr8W7xDv2YzflCIlqN1nGkFjbyD4CrNg6+V1j0fZjPOQ6ssdBBVPrfrvecsAUJ0/48Tqa9VTkEpZSlwOF/VS1sO2ob36FVyWjtxvG9s="

  matrix:
    - MONO_VERSION="3.10.0"

install:
  # Fetch Mono
  - wget "http://download.mono-project.com/archive/${MONO_VERSION}/macos-10-x86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg"
  - sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target /

script:
  - xbuild travis.proj

addons:
  coverity_scan:
    project:
      name: "Pro/dkim-exchange"
      description: "Build submitted via Travis CI"
    notification_email: mail@example.com
    build_command_prepend: "xbuild /t:CleanAll travis.proj"
    build_command:   "xbuild /t:Build travis.proj"
    branch_pattern: coverity_scan

If I execute the coverity build commands as indicated here (using msbuild): https://scan.coverity.com/download?tab=csharp the uploaded archive is analyzed correctly, but in combination with travis, the coverity analysis fails (see eg this build log: https://travis-ci.org/Pro/dkim-exchange/builds/42295611 ). 如果我执行这里所示的coverity构建命令(使用msbuild): https ://scan.coverity.com/download?tab = csharp正确分析上传的存档,但与travis结合,覆盖率分析失败(参见例如这个构建日志: https//travis-ci.org/Pro/dkim-exchange/builds/42295611 )。 There's this warning: 有这个警告:

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

I think this may be related to xbuild from Mono. 我想这可能与Mono的xbuild有关。 Unfortunately Dr. Google didn't find anythin about Coverity+xbuild. 不幸的是谷歌博士没有找到关于Coverity + xbuild的任何内容。 Does Coverity support xbuild? Coverity是否支持xbuild? If yes, how can I correctly setup the project? 如果是,我该如何正确设置项目?

When it comes to C#, Coverity actually only supports msbuild. 说到C#,Coverity实际上只支持msbuild。

You can find some more official information about this in the following 您可以在下面找到更多关于此的官方信息

The last link explicitly states 最后一个链接明确指出

Our C# analysis only supports the Visual Studio C# compilers 我们的C#分析仅支持Visual Studio C#编译器

So, no xbuild support as of now. 所以,截至目前还没有xbuild支持。

Update: 更新:

When you download the Coverity build tool, the doc/en/help/cov-build.txt explicitly states the following: 下载 Coverity构建工具时, doc/en/help/cov-build.txt明确指出以下内容:

C# build capture is only supported on Windows. 仅在Windows上支持C#build capture。

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

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