The StyleCop tool provides warnings that indicate style and consistency rule violations in C# code. The warnings are organized into rule areas such as documentation, layout, naming, ordering, readability, spacing, and so forth. Each warning signifies a violation of a style or consistency rule. This section provides an explanation of each of the default StyleCop rules.

In This Section

Documentation Rules (SA1600-)

Rules which verify the content and formatting of code documentation.

Layout Rules (SA1500-)

Rules which enforce code layout and line spacing.

Maintainability Rules (SA1400-)

Rules which improve code maintainability.

Naming Rules (SA1300-)

Rules which enforce naming requirements for members, types, and variables.

Ordering Rules (SA1200-)

Rules which enforce a standard ordering scheme for code contents.

Readability Rules (SA1100-)

Rules which ensure that the code is well-formatted and readable.

Spacing Rules (SA1000-)

Rules which enforce spacing requirements around keywords and symbols in the code.

Related Topics 

It is possible to suppress the reporting of rule violations by adding suppression attributes within the source code.

Rule Suppressions