I have created a custom rule using stylecop sdk. I have put the custom rule in the StyleCop directory (C:\Program Files (x86)\Microsoft StyleCop 18.104.22.168). I can see the rule using Visual Studio, I right click on the project and there is my custom rule.
I can enable this rule and it shows me the warnings ok, but there is a couple of issues.
First of all, when I try to open the settings using StyleCopSettingsEditor without Visual Studio the rule doesn´t appear. I have tried to open the stylecop settings associated with the project and the settings file which is located in the installation
folder and my rule doesn´t appear.
And there is another issue when I edit the settings inside VisualStudio using the StyleCopSettingsEditor. When I look directly the stylecop settings file only shows my custom rule when is disabled:
<Rules> <Rule Name="CodeMustNotContainHardCodedStrings">
<RuleSettings> <BooleanProperty Name="Enabled">False</BooleanProperty> </RuleSettings>
</Rule> </Rules> </AnalyzerSettings></Analyzer>
However if my rule is set the above code disappear, but the rule works fine. How is that possible? I thought it only would change the booleanproperty to true.