gpt4 book ai didi

c# - Coverity 是否支持 xbuild (mono)?

转载 作者:太空狗 更新时间:2023-10-30 01:18:30 31 4
gpt4 key购买 nike

我有一个 C# 项目:https://github.com/Pro/dkim-exchange

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

Travis 成功构建了我的项目。

我想设置 Coverity 来进行自动代码质量测量。为此,我配置了我的 .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

如果我执行此处指示的 coverity 构建命令(使用 msbuild):https://scan.coverity.com/download?tab=csharp上传的文件被正确分析,但结合 travis,覆盖率分析失败(参见例如这个构建日志:https://travis-ci.org/Pro/dkim-exchange/builds/42295611)。有这个警告:

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

我认为这可能与 Mono 的 xbuild 有关。不幸的是,Google 博士没有找到任何关于 Coverity+xbuild 的信息。 Coverity 是否支持 xbuild?如果是,我该如何正确设置项目?

最佳答案

说到 C#,Coverity 实际上只支持 msbuild。

你可以在下面找到更多关于这方面的官方信息

最后一个链接明确指出

Our C# analysis only supports the Visual Studio C# compilers

所以,目前还没有 xbuild 支持。

更新:

当你 download Coverity 构建工具,doc/en/help/cov-build.txt 明确指出以下内容:

C# build capture is only supported on Windows.

关于c# - Coverity 是否支持 xbuild (mono)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27177284/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com