Sonar-scanner analyzes all 782 files again and again(

We use sonar cloud msbuild sonar-scanner to analyze the .net c# api solution. We trigger it as a separate step in our Bamboo build plan. It was working fine… But for some reason now the sonar-scanner analyzes the code from scratch again and again after each push, that causes a performance issue as well.

Version of a scanner:
sonar-scanner-msbuild-4.6.0.1930-net46

Bamboo logs:

|12-Apr-2019 12:05:26|INFO: 782 files to be analyzed|
|12-Apr-2019 **12:05:36**|INFO: 3/782 files analyzed|
....


|12-Apr-2019 **12:28:44**|INFO: 782/782 files analyzed|
|---|---|
|12-Apr-2019 12:28:44|INFO: 150 files had no CPD blocks|
|12-Apr-2019 12:28:44|INFO: Calculating CPD for 1059 files|
|12-Apr-2019 12:28:45|INFO: CPD calculation finished|
|12-Apr-2019 12:28:47|INFO: SCM writing changed lines|
|12-Apr-2019 12:29:32|WARN: File 'C:\bamboo-home\xml-data\build-dir\DAS-DBLY18-BCTEA\Dashworks.Junior.Api\EvergreenApi.Tests\Fakes\FakeData.cs' was detected as changed but without having changed lines|
|12-Apr-2019 12:29:33|WARN: File 'C:\bamboo-home\xml-data\build-dir\DAS-DBLY18-BCTEA\Dashworks.Logic\Dashworks.Logic\Analysis\IMailboxLogic.cs' was detected as changed but without having changed lines|
|12-Apr-2019 12:29:33|WARN: File 'C:\bamboo-home\xml-data\build-dir\DAS-DBLY18-BCTEA\Dashworks.Logic\Dashworks.Logic\Evergreen\IFilterLogic.cs' was detected as changed but without having changed lines|
|12-Apr-2019 12:29:33|WARN: File 'C:\bamboo-home\xml-data\build-dir\DAS-DBLY18-BCTEA\Dashworks.Junior.Api\EvergreenApi.Tests\Fakes\FakeApplicationLogic.cs' was detected as changed but without having changed lines|
|12-Apr-2019 12:29:33|WARN: File 'C:\bamboo-home\xml-data\build-dir\DAS-DBLY18-BCTEA\PortalWebApp\Dashworks.Service\DesktopBI\IUserService.cs' was detected as changed but without having changed lines|
|12-Apr-2019 12:29:33|INFO: SCM writing changed lines (done) | time=45625ms|
|12-Apr-2019 12:29:34|INFO: Analysis report generated in 48500ms, dir size=11 MB|
|12-Apr-2019 12:29:37|INFO: Analysis report compressed in 3610ms, zip size=4 MB|
|12-Apr-2019 12:29:42|INFO: Analysis report uploaded in 4281ms|
|12-Apr-2019 12:29:42|INFO: ANALYSIS SUCCESSFUL, you can browse https://sonarcloud.io/dashboard?id=EvergreenApi&branch=LightYearEarly&resolved=false|

Hi,

it’s not clear what the problem is. A SonarCloud analysis always analyses the whole code base, because a change on one file can have impacts on many other files.

Can you clarify your situation?