Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use SonarScanner #244

Merged
merged 6 commits into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions build/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,17 @@ Target "RestorePackages" (fun _ ->
)

Target "BeginSonarQube" (fun _ ->
"msbuild-sonarqube-runner" |> Choco.Install id
"sonarscanner-msbuild-net46" |> Choco.Install id

SonarQube Begin (fun p ->
{p with
ToolsPath = "MSBuild.SonarQube.Runner.exe"
Key = "laedit_vika"
Name = "Vika"
Version = version
Settings = [
"sonar.host.url=https://sonarcloud.io";
"sonar.login=" + environVar "SonarQube_Token";
"sonar.projectDescription=\"Visual Interpreter of Kooky Analysis: parse analysis reports and send messages to the build server, or in console.\"";
"sonar.links.homepage=https://github.com/laedit/vika";
"sonar.links.ci=https://ci.appveyor.com/project/laedit/vika";
"sonar.links.issue=https://github.com/laedit/vika/issues";
"sonar.organization=laedit-github"
] })
directExec(fun info ->
info.FileName <- "SonarScanner.MSBuild.exe"
info.Arguments <- "begin /k:\"laedit_vika\" /n:\"Vika\" /o:laedit-github /v:\"" + version + "\" /d:sonar.host.url=https://sonarcloud.io /d:sonar.login=" + environVar "SonarQube_Token" + " /d:sonar.projectDescription=\"Visual Interpreter of Kooky Analysis: parse analysis reports and send messages to the build server, or in console.\" /d:sonar.links.homepage=https://github.com/laedit/vika /d:sonar.links.ci=https://ci.appveyor.com/project/laedit/vika /d:sonar.links.issue=https://github.com/laedit/vika/issues" ) |> ignore
)

Target "EndSonarQube" (fun _ ->
SonarQube End (fun p ->
{p with
ToolsPath = "MSBuild.SonarQube.Runner.exe"
ToolsPath = "SonarScanner.MSBuild.exe"
Settings = [ "sonar.login=" + environVar "SonarQube_Token" ]
})
)
Expand All @@ -75,7 +63,7 @@ Target "InspectCodeAnalysis" (fun _ ->

directExec(fun info ->
info.FileName <- "inspectcode"
info.Arguments <- "/o=\"" + artifactsDir + "inspectcodereport.xml\" /project=\"NVika\" \"src\Vika.sln\"" ) |> ignore
info.Arguments <- "-o=\"" + artifactsDir + "inspectcodereport.xml\" --project=\"NVika\" \"src\Vika.sln\" --toolset=14.0" ) |> ignore
)

let saveGendarmeReportAsGist report =
Expand Down
10 changes: 5 additions & 5 deletions src/NVika/NVika.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@
<HintPath>..\packages\System.IO.Abstractions.3.0.2\lib\net40\System.IO.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
Expand Down Expand Up @@ -125,9 +125,9 @@
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\codecracker.CSharp.1.1.0\analyzers\dotnet\cs\CodeCracker.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.7.9.0.7583\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.7.9.0.7583\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.7.9.0.7583\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.7.10.0.7896\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.7.10.0.7896\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.7.10.0.7896\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
Expand Down