SonarCloud version 3 plugin consuming more LOC

  • ALM used AzureDevops
  • CI system used AzureDevops
  • Scanner command used SonarCloudAnalyze@3
  • Languages of the repository .NET 8.X

I noticed version 3 of the ADO plugin is consuming more LOC compared to version 2. Comparing logs, I noticed test paths and additional source path are being added to “Project configuration” which resulted in additional 1500 files being indexed on version 3

V2.3.4

INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '********.Services.Search.IntegrationTests'
INFO:   Base dir: C:\a\1\s\Search\Core\*******.Services.Search.IntegrationTests
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '********.Services.Search.Tests'
INFO:   Base dir: C:\a\1\s\Search\Core\*******.Services.Search.Tests
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '********.Services.Search'
INFO:   Base dir: C:\a\1\s\Search\Core\********.Services.Search
INFO:   Source paths: Actions/AutoCompleteValues.cs, Actions/GetAggregations.cs, Ac...
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '*******'
INFO:   Base dir: C:\a\1\s
INFO:   Source paths: Search/GlobalSuppressions.cs
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: 390 files indexed

V3.0.2

INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '*****.Services.Search.Tests'
INFO:   Base dir: C:\a\2\s\Search\Core\********.Services.Search.Tests
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '********.Services.Search'
INFO:   Base dir: C:\a\2\s\Search\Core\********.Services.Search
INFO:   Source paths: Actions/AutoCompleteValues.cs, Actions/GetAggregations.cs, Ac...
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: Indexing files of module '*****'
INFO:   Base dir: C:\a\2\s
INFO:   Source paths: Search/GlobalSuppressions.cs, AdobeCampaign/Core/azure-pipeli...
INFO:   Test paths: Search/Internal.SearchAdmin/********.Internal.Sea...
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO:   Excluded sources for coverage: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO:   Excluded sources for duplication: **/*Tests/**, **/Dto/**, **/Models/**, **/*.sql, **/*.json, **/*.yml, **/*.config, **/Automapper/**, **/Entities/**
INFO: 1886 files indexed

Found out it was due to the change below. IMO, the change should have been an opt-in instead of opt-out. It is causing disruptions and cost to purchase more LOC for those who do not know.

1 Like