5
MSBuild(1.1.0.0)用にSonarQubeスキャナーを使用し、複数のプロジェクトを含むソリューションを用意しています。MSBuildスキャナーを使用する際に単一ファイルを除外する方法
スキャナのcliに提供するソリューションのルートフォルダにSonarQube.Analysis.xml
があります。
<SonarQubeAnalysisProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">
<Property Name="sonar.cs.opencover.reportsPaths">output/nunit-coverage.xml</Property>
<Property Name="sonar.cs.nunit.reportsPaths">output/nunit-result.xml</Property>
<Property Name="sonar.exclusions">Project1/Migrations/*</Property>
<Property Name="sonar.coverage.exclusions">Project1/Migrations/*</Property>
</SonarQubeAnalysisProperties>
今の問題がある:Project1/Migrations/*
はBase dir
がスキャン中.../Project1
に設定されているため、除外を取得していないようです。同じことがソリューション内の他のすべてのプロジェクトでも発生します。その結果、.../Project1/Project1/Migrations/*
は不明なパスです。
MSBuildスキャナを使用している場合、ディレクトリ全体をカバレッジとソースコード解析から除外するための推奨方法は何ですか?
ありがとうございます。これはうまくいくかもしれませんが、私はSonarQube関連の設定を自分のプロジェクトファイルに入れたくありません。 – philipooo