I found the following documentation to edit a stylecop rule in the XML
The XML code snippet is below.
<StyleCopSettings Version="4.3">
<Analyzers>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>
In addition, I also found out that you can drag the Settings.Sytlecop
file onto the StyleCopSettingsEditor.exe
which presents a GUI for enabling and disabling the rules.