Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-1411

Scanner for MSBuild should analyze all source files and not just the ones referenced in MSBuild projects




      As of today, only the source files referenced in MSBuild projects are indexed by the Scanner for MSBuild. This is perfectly fine for C# and VB.Net source files but that's very common not to have JS, TS, HTML, CSS, ... source files referenced in those projects. In such a case, our users are lost as they just expect all supported source file extensions to be analyzed whatever is configured in their MSBuild projects.

      When this limitation is explained to them, they start trying to rely on the sonar.sources property which usually results in weird errors mentioning duplication of sources.


      We want to provide a smooth way for users who are not satisfied with the current behavior to be able to specify which sources should be analyzed. This will be especially useful for team working with a JS or TS front-end developer not using Visual Studio and for teams who don't include their database scripts into some MSBuild project.


      The new scanner should provide 2 behaviors:

      1. Current behavior
      2. When the user specifies the sonar.sources property we use it as the source of truth and so we stop listing files included in the MSBuild projects. Note that if the property uses a relative path, it should be relative to sonar.projectBaseDir, if set, or to the location where the scanner is run.


          Issue Links



              • Assignee:
                martin.bednorz Martin Bednorz
              • Votes:
                3 Vote for this issue
                3 Start watching this issue


                • Created: