SonarQube version 22.214.171.124709
After setting up SonarQube for our .NET Framework 4.8 projects there are number of Roslyn analyzer code smell errors that are appearing within SonarQube. The roslyn errors that appear are related to StyleCop. For instance SA1101 ‘Prefix local calls with this’.
These issues do not appear inside Visual Studio as our solution files (.sln) contain our .editorconfig file. In addition to the editor config files we also have the following NuGet packages installed:
- StyleCop.Analyzers → v1.2.0-beta.435 (beta is in use in order to apply newer rules)
- StyleCop.Analyzers.Unstable → v126.96.36.1995
Are you able to provide any information that would help us get SonarQube respecting the editorconfig rules or alternatively stop the Roslyn issues appearing in SonarQube?
For reference the example code smell SA1101 is marked as disabled in our editorconfig file
Yet we still see 13k code smell errors in SonarQube
What we have tried:
- Changing the projects Properties > Code Analysis rule set from the below ‘Microsoft Managed Recommended Rules’ to a custom ruleset that mimics the editorconfig rules