The new version (2.0) of the Resharper plugin for Sonar was extended with the feature of importing an existing Resharper DotSettings file. However, If I set a settings file when I create my quality profile, its settings are not being picked up.
I tried to use the following simple DotSettings file, the only setting in it is disabling the _ prefix of private field names:
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
</wpf:ResourceDictionary>
But even after creating my quality profile with specifying the above DotSettings file, and using this quality profile to analyze a project, I still get the Name 'xyz' does not match rule 'Instance fields (private)'. Suggested name is '_xyz'.
errors.
Also, if I try to download the settings file of my quality profile from the Permalinks tab, it contains a bunch of rules, but it doesn't contain the rule I had in the DotSettings file I imported.
What is the reason for this? Am I doing something wrong?
UPDATE: I looked around a little bit more, but I just got more confused. I've seen that a new version of a runner called "MSBuild SonarQube Runner", but there is also a runner simply called "SonarQube Runner" which we have been using until now.
So the normal SonarQube Runner hasn't been deprecated, but for .NET projects using Resharper, we should start using the MSBuild SonarQube Runner, and that with that we will be able to specify a custom DotSettings file to use when running inspectcode.exe? Or we should manually run inspectcode from the command line?
ReSharper plugin is running in deprecated mode
warning message in the logs, maybe it's related? – Mark Vincze