SonarQube 7.2 Community editions, analysis scope exclusions for Code coverage

Hello,

We have SonarQube 7.2 community edition with TFS, we integrated and its working fine,
however we have configured few exclusions setup in SonarQube server under analysis scope and coverage exclusions, however sonarqube is not considering the exclusions mentioned in the server and the coverage report shows lower number,

please help

Hi,

We’re going to need a little more detail before anyone can help you. As a start, what are your exclusion configurations?

 
Ann

Hello,

Thanks a ton for your response, Please find below attached our global exclusions configurations,

Based on attachment we intent on ignoring all files in the patterns under all folders from coverage calculations,
however from
SonarQube coverage output most of the exclusions are considered for coverage

Your support, and help will be of great help for us.

Hi,

Can you now show me the path in the SQ header of a file that is improperly considered for coverage?

Here’s an example of what I’m looking for:
Selection_454

BTW, I got there via the Coverage drilldown in the Measures page in case you’re curious.

 
Ann

Hello,

Thanks again for the response, please find one the example,

In the analysis scope, exclusion Config page I set the string to ignore all files and anything under fixtures folder, but still the same is considered for coverage.

Please help

Hi,

We’re getting somewhere!

Here’s your relevant exclusion:
Selection_462

And you expect it to exclude
NG-CFG-QTVSERVER/Eurofins.CFG.QTV.Fixtures/Mod/Account/Response/AccountId.cs

But what you’ve actually excluded is files with “Fixtures” in the name. To do what you expect, your configuration would need to be:

**/*Fixtures/**/*.*

Do you understand why?

 
Ann

Hello,

thank you for your comments and suggestions, I will setup the way you suggested,

I have a questions, does this exclude all files under the folder named fixtures, irrespective of any number of folders under folder named “fixtures”?

Regards

Thani

Hi Thani,

** means 0-n directories. So, yes.

 
:slight_smile:
Ann

Dear Sir,

Thank you, it is working as expected.

I have one final question, We want to exclude all assemblyinfo.cs in all folders, can you please help me with the pattern sir,

Please help!

**/assemblyinfo.cs

Many thanks sir
J