How to exclude code coverage using UI at project Level?
up vote
1
down vote
favorite
I noticed my basedir in MSBUILD is C:blah.gitBahSource**
which has several different directories that is runs code coverage on.
My example is:
C:blah.gitBlahSourceCore
C:blah.gitBlahSourceLogo
C:blah.gitBlahSourceFiles
C:blah.gitBlahSourceMoreStuff
It runs code coverage on each one of those areas so I cannot use the expression **/MoreStuff/**
to exclude MoreStuff from the codecoverage. As that expresssion would look for:
C:blah.gitBlahSourceMoreStuff**MoreStuff**
.
I tried to use ..MoreStuff** but that does not work.
Any suggestion on the syntax to exclude MoreStuff?
sonarqube
add a comment |
up vote
1
down vote
favorite
I noticed my basedir in MSBUILD is C:blah.gitBahSource**
which has several different directories that is runs code coverage on.
My example is:
C:blah.gitBlahSourceCore
C:blah.gitBlahSourceLogo
C:blah.gitBlahSourceFiles
C:blah.gitBlahSourceMoreStuff
It runs code coverage on each one of those areas so I cannot use the expression **/MoreStuff/**
to exclude MoreStuff from the codecoverage. As that expresssion would look for:
C:blah.gitBlahSourceMoreStuff**MoreStuff**
.
I tried to use ..MoreStuff** but that does not work.
Any suggestion on the syntax to exclude MoreStuff?
sonarqube
If you have *.csproj file inside MoreStuff catalog then this is impossible, as this is a root of your project. Nasty trick would be to mark MoreStuff catalog as test project - after that sonar will ignore it in coverage results. You could go to Administration > General Settings > Scanner for MSBuild and set test project pattern (but this is deprecated), or use sonar.msbuild.testProjectPattern during the scan.
– Peska
Nov 8 at 7:58
So in .csproj of MoreStuff add <SonarQubeTestProject>true</SonarQubeTestProject>
– Herb Scruggs
Nov 8 at 21:26
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I noticed my basedir in MSBUILD is C:blah.gitBahSource**
which has several different directories that is runs code coverage on.
My example is:
C:blah.gitBlahSourceCore
C:blah.gitBlahSourceLogo
C:blah.gitBlahSourceFiles
C:blah.gitBlahSourceMoreStuff
It runs code coverage on each one of those areas so I cannot use the expression **/MoreStuff/**
to exclude MoreStuff from the codecoverage. As that expresssion would look for:
C:blah.gitBlahSourceMoreStuff**MoreStuff**
.
I tried to use ..MoreStuff** but that does not work.
Any suggestion on the syntax to exclude MoreStuff?
sonarqube
I noticed my basedir in MSBUILD is C:blah.gitBahSource**
which has several different directories that is runs code coverage on.
My example is:
C:blah.gitBlahSourceCore
C:blah.gitBlahSourceLogo
C:blah.gitBlahSourceFiles
C:blah.gitBlahSourceMoreStuff
It runs code coverage on each one of those areas so I cannot use the expression **/MoreStuff/**
to exclude MoreStuff from the codecoverage. As that expresssion would look for:
C:blah.gitBlahSourceMoreStuff**MoreStuff**
.
I tried to use ..MoreStuff** but that does not work.
Any suggestion on the syntax to exclude MoreStuff?
sonarqube
sonarqube
asked Nov 7 at 20:49
Herb Scruggs
61
61
If you have *.csproj file inside MoreStuff catalog then this is impossible, as this is a root of your project. Nasty trick would be to mark MoreStuff catalog as test project - after that sonar will ignore it in coverage results. You could go to Administration > General Settings > Scanner for MSBuild and set test project pattern (but this is deprecated), or use sonar.msbuild.testProjectPattern during the scan.
– Peska
Nov 8 at 7:58
So in .csproj of MoreStuff add <SonarQubeTestProject>true</SonarQubeTestProject>
– Herb Scruggs
Nov 8 at 21:26
add a comment |
If you have *.csproj file inside MoreStuff catalog then this is impossible, as this is a root of your project. Nasty trick would be to mark MoreStuff catalog as test project - after that sonar will ignore it in coverage results. You could go to Administration > General Settings > Scanner for MSBuild and set test project pattern (but this is deprecated), or use sonar.msbuild.testProjectPattern during the scan.
– Peska
Nov 8 at 7:58
So in .csproj of MoreStuff add <SonarQubeTestProject>true</SonarQubeTestProject>
– Herb Scruggs
Nov 8 at 21:26
If you have *.csproj file inside MoreStuff catalog then this is impossible, as this is a root of your project. Nasty trick would be to mark MoreStuff catalog as test project - after that sonar will ignore it in coverage results. You could go to Administration > General Settings > Scanner for MSBuild and set test project pattern (but this is deprecated), or use sonar.msbuild.testProjectPattern during the scan.
– Peska
Nov 8 at 7:58
If you have *.csproj file inside MoreStuff catalog then this is impossible, as this is a root of your project. Nasty trick would be to mark MoreStuff catalog as test project - after that sonar will ignore it in coverage results. You could go to Administration > General Settings > Scanner for MSBuild and set test project pattern (but this is deprecated), or use sonar.msbuild.testProjectPattern during the scan.
– Peska
Nov 8 at 7:58
So in .csproj of MoreStuff add <SonarQubeTestProject>true</SonarQubeTestProject>
– Herb Scruggs
Nov 8 at 21:26
So in .csproj of MoreStuff add <SonarQubeTestProject>true</SonarQubeTestProject>
– Herb Scruggs
Nov 8 at 21:26
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53197597%2fhow-to-exclude-code-coverage-using-ui-at-project-level%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If you have *.csproj file inside MoreStuff catalog then this is impossible, as this is a root of your project. Nasty trick would be to mark MoreStuff catalog as test project - after that sonar will ignore it in coverage results. You could go to Administration > General Settings > Scanner for MSBuild and set test project pattern (but this is deprecated), or use sonar.msbuild.testProjectPattern during the scan.
– Peska
Nov 8 at 7:58
So in .csproj of MoreStuff add <SonarQubeTestProject>true</SonarQubeTestProject>
– Herb Scruggs
Nov 8 at 21:26