StyleCop.Analyzers: Disable SA1633 & SA1652

timmkrause picture timmkrause · Mar 7, 2016 · Viewed 12.7k times · Source

I have already consulted the configuration documentation, but couldn't find anything.

I want to disable both of the following rules:

SA1633: The file header is missing or not located at the top of the file.
SA1652: Enable XML documentation output.

My stylecop.json looks like this:

{
  "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
  "settings": {
    "orderingRules": {
      "usingDirectivesPlacement": "outsideNamespace"
    }
  }
}

Any ideas?

Answer

Nicole Calinoiu picture Nicole Calinoiu · Mar 7, 2016

Enabling and disabling rules is done via a ruleset file, not the configuration .json file. For details regarding use of ruleset files, see https://msdn.microsoft.com/en-us/library/dd264996.aspx.