Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit cfdc2fa

Browse files
committed
sonarqube integration
1 parent c8d87bc commit cfdc2fa

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*.userosscache
88
*.sln.docstates
99

10+
1011
# User-specific files (MonoDevelop/Xamarin Studio)
1112
*.userprefs
1213

@@ -24,6 +25,7 @@ bld/
2425

2526
# Visual Studio 2015 cache/options directory
2627
.vs/
28+
.sonarqube/
2729
# Uncomment if you have tasks that create the project's static files in wwwroot
2830
#wwwroot/
2931

@@ -37,6 +39,7 @@ bld/
3739
# NUNIT
3840
*.VisualState.xml
3941
TestResult.xml
42+
coverage.opencover.xml
4043

4144
# Build Results of an ATL Project
4245
[Dd]ebugPS/

src/sonarqube-build.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
2+
dotnet build-server shutdown
3+
dotnet sonarscanner begin /d:sonar.login=4fb6d7d978373797169fd04634f9892897cdb3fe /k:"jpproject" /d:sonar.cs.opencover.reportsPaths="**\coverage.opencover.xml"
4+
dotnet build
5+
dotnet sonarscanner end /d:sonar.login=4fb6d7d978373797169fd04634f9892897cdb3fe

tests/JpProject.Domain.Tests/JpProject.Domain.Tests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15+
<PackageReference Include="coverlet.msbuild" Version="2.6.3">
16+
<PrivateAssets>all</PrivateAssets>
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
</PackageReference>
1519
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
1620
<PackageReference Include="Moq" Version="4.12.0" />
1721
<PackageReference Include="xunit" Version="2.4.1" />

0 commit comments

Comments
 (0)