DanielHWe / sonar-fxcop

FxCop plugin for C# or VB.NET projects
13 stars 6 forks source link

FXCop issues on excluded source files are unexpectidely reported at SQ project level #1

Closed fmallet closed 7 years ago

fmallet commented 7 years ago

Issue originally reported here: https://stackoverflow.com/questions/38370785

If <SonarQubeExclude>true</SonarQubeExclude> is added to a file in a project (and/or if the file is excluded with sonar.exclusions), then that will not be uploaded to the server (and won't have SonarAnalyzer issues either), but the FxCop issues are showing up (at module level). We should apply the same filtering everywhere.

Here is the root cause of the issue :

As the trick relates to FXCop, I think the workaround should also be part of the FXCop plugin and not located outside (for instance in the Scanner for MSBuild). The workaround could be the following one :