Azure TFS analyze task issues frome excluded file appears in Sonar report

Hello,

We are using Sonar tasks for our Azure DevOps builds with TFS. I upgraded to version 7 of the tasks (instead of version 5).

In the Prepare Analysis Configuration task, under the additional properties parameter, I added the following lines:

sonar.exclusions=**\bin\**\*,**\Metiers\_Commun\Classes\**\*.cs, **\IHM\Dictionnaires\**\*, **\IHM\Resources\*, **\IHM\PatchSkin\*, *.js
sonar.projectBaseDir = $(system.defaultworkingdirectory)$(solutionDir)
sonar.scanner.scanAll=false

The analysis task is correctly ignoring these files, as no issues are reported for them in the “Overall Code” report.

However, if I click on the 4.7K issues, all the ignored issues still seem to be counted.

In addition, the analysis and publishing steps seem to take much longer since switching to version 7: over 30 minutes, whereas these tasks took less than 10 minutes with version 5.

I’m attaching the logs of the “Run Code Analysis” task.

16.txt (1.4 MB)

Any ideas ?

Hi,

For the inconsistent issue counts, I sounds like you need to force an ElasticSearch reindex.

For analysis time, a look at your log (thanks for including that in the first post!) shows that the bulk of the time, from 13:30:44 to 13:49:51 is spent in the SCM-TFVC sensor. I don’t know why it would only show up now, and I don’t mean to pass the buck, but we don’t offer TFVC integration. You should talk to the maintainers of that plugin.

 
HTH,
Ann

Hi,

I forced the reindexing and it seems to have worked.
Thanks :slight_smile:

1 Like