Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.17 KB

SA0002.md

File metadata and controls

40 lines (29 loc) · 1.17 KB

SA0002

TypeName SA0002InvalidSettingsFile
CheckId SA0002
Category Special Rules

📝 This rule is new for StyleCop Analyzers, and was not present in StyleCop Classic.

Cause

The stylecop.json settings file could not be loaded due to a deserialization error.

Rule description

This rule reports cases where the StyleCop Analyzers settings file could not be loaded. When this occurs, the various analyzers automatically fall back to using the default settings, which may not match the user's expectations.

How to fix violations

To fix a violation of this rule, start by checking the following items:

  • Ensure stylecop.json contains valid JSON syntax. The file may be opened in Visual Studio 2015 to check for common errors (they are reported by the IDE in the Errors window).
  • Review the configuration documentation and ensure the contents of stylecop.json contain valid settings.

How to suppress violations

This warning can only be suppressed by disabling the warning in the ruleset file for the project.