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?










share|improve this question






















  • 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

















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?










share|improve this question






















  • 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















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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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




















  • 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



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()