Releases: DotNetAnalyzers/StyleCopAnalyzers
1.1.1-beta.61
Beta Release
Summary
- Bug fixes
- Other
- Update version from 1.1.0 to 1.1.1 (#2815)
Upgrade notices
Upgrading from StyleCop Classic
📝 This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
➡️ We now have a list of known changes in behavior relative to StyleCop Classic.
Upgrading from StyleCop Analyzers 1.0.0
Binaries
- NuGet: StyleCop.Analyzers 1.1.1-beta.61
- NuGet (Unstable): StyleCop.Analyzers.Unstable 1.1.1.61
Analyzers
Table of Analyzers
The following analyzers are included in this release (all with Warning severity by default).
ID | Title | Code Fix |
---|---|---|
SA0001 ³ | All diagnostics of XML documentation comments has been disabled due to the current project configuration | |
SA0002 ³ | The stylecop.json settings file could not be loaded due to a deserialization error | |
SA1000 | Keywords must be spaced correctly | ✔ |
SA1001 | Commas must be spaced correctly | ✔ |
SA1002 | Semicolons must be spaced correctly | ✔ |
SA1003 | Symbols must be spaced correctly | ✔ |
SA1004 | Documentation lines must begin with single space | ✔ |
SA1005 | Single line comments must begin with single space | ✔ |
SA1006 | Preprocessor keywords must not be preceded by space | ✔ |
SA1007 | Operator keyword must be followed by space | ✔ |
SA1008 | Opening parenthesis must be spaced correctly | ✔ |
SA1009 | Closing parenthesis must be spaced correctly | ✔ |
SA1010 | Opening square brackets must be spaced correctly | ✔ |
SA1011 | Closing square brackets must be spaced correctly | ✔ |
SA1012 | Opening braces must be spaced correctly | ✔ |
SA1013 | Closing braces must be spaced correctly | ✔ |
SA1014 | Opening generic brackets must be spaced correctly | ✔ |
SA1015 | Closing generic brackets must be spaced correctly | ✔ |
SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
SA1018 | Nullable type symbols must be spaced correctly | ✔ |
SA1019 | Member access symbols must be spaced correctly | ✔ |
SA1020 | Increment decrement symbols must be spaced correctly | ✔ |
SA1021 | Negative signs must be spaced correctly | ✔ |
SA1022 | Positive signs must be spaced correctly | ✔ |
SA1023 | Dereference and access of symbols must be spaced correctly | ✔ |
SA1024 | Colons Must Be Spaced Correctly | ✔ |
SA1025 | Code must not contain multiple whitespace in a row | ✔ |
SA1026 | Code must not contain space after new keyword in implicitly typed array allocation | ✔ |
SA1027 | Tabs must not be used | ✔ |
SA1028 ³ | Code must not contain trailing whitespace | ✔ |
SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
SA1101 | Prefix local calls with this | ✔ |
SA1102 | Query clause must follow previous clause | ✔ |
SA1103 | Query clauses must be on separate lines or all on one line | ✔ |
SA1104 | Query clause must begin on new line when previous clause spans multiple lines | ✔ |
SA1105 | Query clauses spanning multiple lines must begin on own line | ✔ |
SA1106 | Code must not contain empty statements | ✔ |
SA1107 | Code must not contain multiple statements on one line | ✔ |
SA1108 | Block statements must not contain embedded comments | |
SA1110 | Opening parenthesis or bracket must be on declaration line | ✔ |
SA1111 | Closing parenthesis must be on line of last parameter | ✔ |
SA1112 | Closing parenthesis must be on line of opening parenthesis | ✔ |
SA1113 | Comma must be on the same line as previous parameter | ✔ |
SA1114 | Parameter list must follow declaration | |
SA1115 | Parameter must follow comma | |
SA1116 | Split parameters must start on line after declaration | ✔ |
SA1117 | Parameters must be on same line or separate lines | |
SA1118 | Parameter must not span multiple lines | |
SA1119 | Statement must not use unnecessary parenthesis | ✔ |
SA1120 | Comments must contain text | ✔ |
SA1121 | Use built-in type alias | ✔ |
SA1122 | Use string.Empty for empty strings | ✔ |
SA1123 | Do not place regions within elements | ✔ |
SA1124 | Do not use regions | ✔ |
SA1125 | Use shorthand for nullable types | ✔¹ |
SA1127 ³ | Generic type constraints must be on their own line | ✔ |
SA1128 ³ | Put constructor initializers on their own line | ✔ |
SA1129 ³ | Do not use default value type constructor | ✔ |
SA1130 ³ | Use lambda syntax | ✔ |
SA1131 ³ | Use readable conditions | ✔ |
SA1132 ³ | Do not combine fields | ✔ |
SA1133 ³ | Do not combine attributes | ✔ |
SA1134 ³ | Attributes must not share line | ✔ |
SA1135 ³ | Using directives should be qualified | ✔ |
SA1136 ³ | Multiple enum values are placed on the same line of code | ✔ |
SA1137 ³ | Elements should have the same indentation | ✔ |
SX1101 ² ³ | Do not prefix local calls with 'this.' | ✔ |
SA1200 | Using directives must be placed within namespace | ✔ |
SA1201 | Elements must appear in the correct order | |
SA1202 | Elements must be ordered by access | |
SA1203 | Constants must appear before fields | |
SA1204 | Static elements must appear before instance elements | |
SA1205 | Partial elements must declare access | ✔ |
SA1206 | Declaration keywords must follow order | |
SA1207 | Protected must come before internal | ✔ |
SA1208 | System using directives must be placed before other using directives | ✔ |
SA1209 | Using alias directives must be placed after other using directives | ✔ |
SA1210 | Using directives must be ordered alphabetically by namespace | ✔ |
SA1211 | Using alias directives must be ordered alphabetically by alias name | ✔ |
SA1212 | Property accessors must follow order | ✔ |
SA1213 | Event accessors must follow order | ✔ |
SA1214 | Readonly fields must appear before non-readonly fields | |
SA1216 ³ | Using static directives must be placed after other using directives | ✔ |
SA1217 ³ | Using static directives must be ordered alphabetically | ✔ |
SA1300 | Element must begin with upper-case letter | ✔ |
SA1302 | Interface names must begin with I | ✔ |
SA1303 | Const field names must begin with upper-case letter | ✔ |
SA1304 | Non-private readonly fields must begin with upper-case letter | ✔ |
SA1305 ⁴ | Field names must not use Hungarian notation | |
SA1306 | Field names must begin with lower-case letter | ✔ |
SA1307 | Accessible fields must begin with upper-case letter | ✔ |
SA1308 | Variable names must not be prefixed | ✔ |
SA1309 | Field names must not begin with underscore | ✔ |
SA1310 | Field names must not contain underscore | ✔ |
SA1311 | Static readonly fields must begin with upper-case letter | ✔ |
SA1312 ³ | Variable names must begin with lower case letter | ✔ |
SA1313 ³ | Parameter names must begin with lower case letter | ✔ |
SA1314 ³ | The name of a C# type parameter does not begin with the capital letter T | ✔ |
SX1309 ² ³ | Field names must begin with underscore | ✔ |
SX1309S ² ³ | Static field names must begin with underscore | ✔ |
SA1400 | Access modifier must be declared | ✔ |
SA1401 | Fields must be private | |
SA1402 | File may only contain a single class | ✔ |
SA1403 | File may only contain a single namespace | |
SA1404 | Code analysis suppression must have justification | ✔ |
SA1405 | Debug.Assert must provide message text | |
SA1406 | Debug.Fail must provide message text | |
SA1407 | Arithmetic expressions must declare precedence | ✔ |
SA1408 | Conditional expressions must declare precedence | ✔ |
SA1410 | Remove delegate parenthesis when possible | ✔ |
SA1411 | Attribute constructor must not use unnecessary parenthesis | ✔ |
SA1412 ³ ⁴ | Store files as UTF-8 | ✔ |
SA1413 ³ | Use trailing comma in multi-line initializers | ✔ |
SA1500 | Braces for multi-line statements must not share line | ✔ |
SA1501 | Statement must not be on a single line | ✔ |
SA1502 | Element must not be on a single line | ✔ |
SA1503 | Braces must not be omitted | ✔ |
SA1504 | All accessors must be single-line or multi-line | ✔ |
SA1505 | Opening braces must not be followed by blank line | ✔ |
SA1506 | Element documentation headers must not be followed by blank line | ✔ |
SA1507 | Code must not contain multiple blank lines in a row | ✔ |
SA1508 | Closing braces must not be preceded by blank line | ✔ |
SA1509 | Opening braces must not be preceded by blank line | ✔ |
SA1510 | Chained statement blocks must not be preceded by blank line | ✔ |
SA1511 | While-do footer must not be preceded by blank line | ✔ |
SA1512 | Single-line comments must not be followed by blank line | ✔ |
SA1513 | Closing brace must be followed by blank line | ✔ |
SA1514 | Element documentation header must be preceded by blank line | ✔ |
SA1515 | Single-line comment must be preceded by blank line | ✔ |
SA1516 | Elements must be separated by blank line | ✔ |
SA1517 | Code must not contain blank lines at start of file | ✔ |
SA1518 | Use line endings correctly at end of file | ✔ |
SA1519 ³ | Braces must not be omitted from multi-line child statement | ✔ |
SA1520 ³ | Use braces consistently | ✔ |
SA1600 | Elements must be docume... |
1.1.0-beta.47
Beta Release
Summary
- Bug fixes
- Other
Upgrade notices
Upgrading from StyleCop Classic
📝 This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
➡️ We now have a list of known changes in behavior relative to StyleCop Classic.
Upgrading from StyleCop Analyzers 1.0.0
Binaries
- NuGet: StyleCop.Analyzers 1.1.0-beta.47
- NuGet (Unstable): StyleCop.Analyzers.Unstable 1.1.0.47
Analyzers
Table of Analyzers
The following analyzers are included in this release (all with Warning severity by default).
ID | Title | Code Fix |
---|---|---|
SA0001 ³ | All diagnostics of XML documentation comments has been disabled due to the current project configuration | |
SA0002 ³ | The stylecop.json settings file could not be loaded due to a deserialization error | |
SA1000 | Keywords must be spaced correctly | ✔ |
SA1001 | Commas must be spaced correctly | ✔ |
SA1002 | Semicolons must be spaced correctly | ✔ |
SA1003 | Symbols must be spaced correctly | ✔ |
SA1004 | Documentation lines must begin with single space | ✔ |
SA1005 | Single line comments must begin with single space | ✔ |
SA1006 | Preprocessor keywords must not be preceded by space | ✔ |
SA1007 | Operator keyword must be followed by space | ✔ |
SA1008 | Opening parenthesis must be spaced correctly | ✔ |
SA1009 | Closing parenthesis must be spaced correctly | ✔ |
SA1010 | Opening square brackets must be spaced correctly | ✔ |
SA1011 | Closing square brackets must be spaced correctly | ✔ |
SA1012 | Opening braces must be spaced correctly | ✔ |
SA1013 | Closing braces must be spaced correctly | ✔ |
SA1014 | Opening generic brackets must be spaced correctly | ✔ |
SA1015 | Closing generic brackets must be spaced correctly | ✔ |
SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
SA1018 | Nullable type symbols must be spaced correctly | ✔ |
SA1019 | Member access symbols must be spaced correctly | ✔ |
SA1020 | Increment decrement symbols must be spaced correctly | ✔ |
SA1021 | Negative signs must be spaced correctly | ✔ |
SA1022 | Positive signs must be spaced correctly | ✔ |
SA1023 | Dereference and access of symbols must be spaced correctly | ✔ |
SA1024 | Colons Must Be Spaced Correctly | ✔ |
SA1025 | Code must not contain multiple whitespace in a row | ✔ |
SA1026 | Code must not contain space after new keyword in implicitly typed array allocation | ✔ |
SA1027 | Tabs must not be used | ✔ |
SA1028 ³ | Code must not contain trailing whitespace | ✔ |
SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
SA1101 | Prefix local calls with this | ✔ |
SA1102 | Query clause must follow previous clause | ✔ |
SA1103 | Query clauses must be on separate lines or all on one line | ✔ |
SA1104 | Query clause must begin on new line when previous clause spans multiple lines | ✔ |
SA1105 | Query clauses spanning multiple lines must begin on own line | ✔ |
SA1106 | Code must not contain empty statements | ✔ |
SA1107 | Code must not contain multiple statements on one line | ✔ |
SA1108 | Block statements must not contain embedded comments | |
SA1110 | Opening parenthesis or bracket must be on declaration line | ✔ |
SA1111 | Closing parenthesis must be on line of last parameter | ✔ |
SA1112 | Closing parenthesis must be on line of opening parenthesis | ✔ |
SA1113 | Comma must be on the same line as previous parameter | ✔ |
SA1114 | Parameter list must follow declaration | |
SA1115 | Parameter must follow comma | |
SA1116 | Split parameters must start on line after declaration | ✔ |
SA1117 | Parameters must be on same line or separate lines | |
SA1118 | Parameter must not span multiple lines | |
SA1119 | Statement must not use unnecessary parenthesis | ✔ |
SA1120 | Comments must contain text | ✔ |
SA1121 | Use built-in type alias | ✔ |
SA1122 | Use string.Empty for empty strings | ✔ |
SA1123 | Do not place regions within elements | ✔ |
SA1124 | Do not use regions | ✔ |
SA1125 | Use shorthand for nullable types | ✔¹ |
SA1127 ³ | Generic type constraints must be on their own line | ✔ |
SA1128 ³ | Put constructor initializers on their own line | ✔ |
SA1129 ³ | Do not use default value type constructor | ✔ |
SA1130 ³ | Use lambda syntax | ✔ |
SA1131 ³ | Use readable conditions | ✔ |
SA1132 ³ | Do not combine fields | ✔ |
SA1133 ³ | Do not combine attributes | ✔ |
SA1134 ³ | Attributes must not share line | ✔ |
SA1135 ³ | Using directives should be qualified | ✔ |
SA1136 ³ | Multiple enum values are placed on the same line of code | ✔ |
SA1137 ³ | Elements should have the same indentation | ✔ |
SX1101 ² ³ | Do not prefix local calls with 'this.' | ✔ |
SA1200 | Using directives must be placed within namespace | ✔ |
SA1201 | Elements must appear in the correct order | |
SA1202 | Elements must be ordered by access | |
SA1203 | Constants must appear before fields | |
SA1204 | Static elements must appear before instance elements | |
SA1205 | Partial elements must declare access | ✔ |
SA1206 | Declaration keywords must follow order | |
SA1207 | Protected must come before internal | ✔ |
SA1208 | System using directives must be placed before other using directives | ✔ |
SA1209 | Using alias directives must be placed after other using directives | ✔ |
SA1210 | Using directives must be ordered alphabetically by namespace | ✔ |
SA1211 | Using alias directives must be ordered alphabetically by alias name | ✔ |
SA1212 | Property accessors must follow order | ✔ |
SA1213 | Event accessors must follow order | ✔ |
SA1214 | Readonly fields must appear before non-readonly fields | |
SA1216 ³ | Using static directives must be placed after other using directives | ✔ |
SA1217 ³ | Using static directives must be ordered alphabetically | ✔ |
SA1300 | Element must begin with upper-case letter | ✔ |
SA1302 | Interface names must begin with I | ✔ |
SA1303 | Const field names must begin with upper-case letter | ✔ |
SA1304 | Non-private readonly fields must begin with upper-case letter | ✔ |
SA1305 ⁴ | Field names must not use Hungarian notation | |
SA1306 | Field names must begin with lower-case letter | ✔ |
SA1307 | Accessible fields must begin with upper-case letter | ✔ |
SA1308 | Variable names must not be prefixed | ✔ |
SA1309 | Field names must not begin with underscore | ✔ |
SA1310 | Field names must not contain underscore | ✔ |
SA1311 | Static readonly fields must begin with upper-case letter | ✔ |
SA1312 ³ | Variable names must begin with lower case letter | ✔ |
SA1313 ³ | Parameter names must begin with lower case letter | ✔ |
SA1314 ³ | The name of a C# type parameter does not begin with the capital letter T | ✔ |
SX1309 ² ³ | Field names must begin with underscore | ✔ |
SX1309S ² ³ | Static field names must begin with underscore | ✔ |
SA1400 | Access modifier must be declared | ✔ |
SA1401 | Fields must be private | |
SA1402 | File may only contain a single class | ✔ |
SA1403 | File may only contain a single namespace | |
SA1404 | Code analysis suppression must have justification | ✔ |
SA1405 | Debug.Assert must provide message text | |
SA1406 | Debug.Fail must provide message text | |
SA1407 | Arithmetic expressions must declare precedence | ✔ |
SA1408 | Conditional expressions must declare precedence | ✔ |
SA1410 | Remove delegate parenthesis when possible | ✔ |
SA1411 | Attribute constructor must not use unnecessary parenthesis | ✔ |
SA1412 ³ ⁴ | Store files as UTF-8 | ✔ |
SA1413 ³ | Use trailing comma in multi-line initializers | ✔ |
SA1500 | Braces for multi-line statements must not share line | ✔ |
SA1501 | Statement must not be on a single line | ✔ |
SA1502 | Element must not be on a single line | ✔ |
SA1503 | Braces must not be omitted | ✔ |
SA1504 | All accessors must be single-line or multi-line | ✔ |
SA1505 | Opening braces must not be followed by blank line | ✔ |
SA1506 | Element documentation headers must not be followed by blank line | ✔ |
SA1507 | Code must not contain multiple blank lines in a row | ✔ |
SA1508 | Closing braces must not be preceded by blank line | ✔ |
SA1509 | Opening braces must not be preceded by blank line | ✔ |
SA1510 | Chained statement blocks must not be preceded by blank line | ✔ |
SA1511 | While-do footer must not be preceded by blank line | ✔ |
SA1512 | Single-line comments must not be followed by blank line | ✔ |
SA1513 | Closing brace must be followed by blank line | ✔ |
SA1514 | Element documentation header must be preceded by blank line | ✔ |
SA1515 | Single-line comment must be preceded by blank line | ✔ |
SA1516 | Elements must be separated by blank line | ✔ |
SA1517 | Code must not contain blank lines at start of file | ✔ |
SA1518 | Use line endings correctly at end of file | ✔ |
SA1519 ³ | Braces must not be omitted from multi-line child statement | ✔ |
SA1520 ... |
1.1.0 Beta 9
1.1.0-beta009 Update version numbers for release 1.1.0-beta009
1.1.0 Beta 8
Release notes coming soon
1.1.0 Beta 7
Beta Release
Summary
- New rules
- SA1135 (Using directives should be qualified) (#1761, documentation)
- SA1629 (Documentation text should end with a period) (#149, documentation)
- New code fixes
- Documentation rules: SA1600 (#764)
- Bug fixes
- Other
- Documentation updates (#2630)
Upgrade notices
Upgrading from StyleCop Classic
📝 This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
➡️ We now have a list of known changes in behavior relative to StyleCop Classic.
Upgrading from StyleCop Analyzers 1.0.0
Binaries
Analyzers
Table of Analyzers
The following analyzers are included in this release (all with Warning severity by default).
ID | Title | Code Fix |
---|---|---|
SA0001 ³ | All diagnostics of XML documentation comments has been disabled due to the current project configuration | |
SA0002 ³ | The stylecop.json settings file could not be loaded due to a deserialization error | |
SA1000 | Keywords must be spaced correctly | ✔ |
SA1001 | Commas must be spaced correctly | ✔ |
SA1002 | Semicolons must be spaced correctly | ✔ |
SA1003 | Symbols must be spaced correctly | ✔ |
SA1004 | Documentation lines must begin with single space | ✔ |
SA1005 | Single line comments must begin with single space | ✔ |
SA1006 | Preprocessor keywords must not be preceded by space | ✔ |
SA1007 | Operator keyword must be followed by space | ✔ |
SA1008 | Opening parenthesis must be spaced correctly | ✔ |
SA1009 | Closing parenthesis must be spaced correctly | ✔ |
SA1010 | Opening square brackets must be spaced correctly | ✔ |
SA1011 | Closing square brackets must be spaced correctly | ✔ |
SA1012 | Opening braces must be spaced correctly | ✔ |
SA1013 | Closing braces must be spaced correctly | ✔ |
SA1014 | Opening generic brackets must be spaced correctly | ✔ |
SA1015 | Closing generic brackets must be spaced correctly | ✔ |
SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
SA1018 | Nullable type symbols must be spaced correctly | ✔ |
SA1019 | Member access symbols must be spaced correctly | ✔ |
SA1020 | Increment decrement symbols must be spaced correctly | ✔ |
SA1021 | Negative signs must be spaced correctly | ✔ |
SA1022 | Positive signs must be spaced correctly | ✔ |
SA1023 | Dereference and access of symbols must be spaced correctly | ✔ |
SA1024 | Colons Must Be Spaced Correctly | ✔ |
SA1025 | Code must not contain multiple whitespace in a row | ✔ |
SA1026 | Code must not contain space after new keyword in implicitly typed array allocation | ✔ |
SA1027 | Tabs must not be used | ✔ |
SA1028 ³ | Code must not contain trailing whitespace | ✔ |
SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
SA1101 | Prefix local calls with this | ✔ |
SA1102 | Query clause must follow previous clause | ✔ |
SA1103 | Query clauses must be on separate lines or all on one line | ✔ |
SA1104 | Query clause must begin on new line when previous clause spans multiple lines | ✔ |
SA1105 | Query clauses spanning multiple lines must begin on own line | ✔ |
SA1106 | Code must not contain empty statements | ✔ |
SA1107 | Code must not contain multiple statements on one line | ✔ |
SA1108 | Block statements must not contain embedded comments | |
SA1110 | Opening parenthesis or bracket must be on declaration line | ✔ |
SA1111 | Closing parenthesis must be on line of last parameter | ✔ |
SA1112 | Closing parenthesis must be on line of opening parenthesis | ✔ |
SA1113 | Comma must be on the same line as previous parameter | ✔ |
SA1114 | Parameter list must follow declaration | |
SA1115 | Parameter must follow comma | |
SA1116 | Split parameters must start on line after declaration | ✔ |
SA1117 | Parameters must be on same line or separate lines | |
SA1118 | Parameter must not span multiple lines | |
SA1119 | Statement must not use unnecessary parenthesis | ✔ |
SA1120 | Comments must contain text | ✔ |
SA1121 | Use built-in type alias | ✔ |
SA1122 | Use string.Empty for empty strings | ✔ |
SA1123 | Do not place regions within elements | ✔ |
SA1124 | Do not use regions | ✔ |
SA1125 | Use shorthand for nullable types | ✔¹ |
SA1127 ³ | Generic type constraints must be on their own line | ✔ |
SA1128 ³ | Put constructor initializers on their own line | ✔ |
SA1129 ³ | Do not use default value type constructor | ✔ |
SA1130 ³ | Use lambda syntax | ✔ |
SA1131 ³ | Use readable conditions | ✔ |
SA1132 ³ | Do not combine fields | ✔ |
SA1133 ³ | Do not combine attributes | ✔ |
SA1134 ³ | Attributes must not share line | ✔ |
SA1135 ³ | Using directives should be qualified | ✔ |
SA1136 ³ | Multiple enum values are placed on the same line of code | ✔ |
SA1137 ³ | Elements should have the same indentation | ✔ |
SX1101 ² ³ | Do not prefix local calls with 'this.' | ✔ |
SA1200 | Using directives must be placed within namespace | ✔ |
SA1201 | Elements must appear in the correct order | |
SA1202 | Elements must be ordered by access | |
SA1203 | Constants must appear before fields | |
SA1204 | Static elements must appear before instance elements | |
SA1205 | Partial elements must declare access | ✔ |
SA1206 | Declaration keywords must follow order | |
SA1207 | Protected must come before internal | ✔ |
SA1208 | System using directives must be placed before other using directives | ✔ |
SA1209 | Using alias directives must be placed after other using directives | ✔ |
SA1210 | Using directives must be ordered alphabetically by namespace | ✔ |
SA1211 | Using alias directives must be ordered alphabetically by alias name | ✔ |
SA1212 | Property accessors must follow order | ✔ |
SA1213 | Event accessors must follow order | ✔ |
SA1214 | Readonly fields must appear before non-readonly fields | |
SA1216 ³ | Using static directives must be placed after other using directives | ✔ |
SA1217 ³ | Using static directives must be ordered alphabetically | ✔ |
SA1300 | Element must begin with upper-case letter | ✔ |
SA1302 | Interface names must begin with I | ✔ |
SA1303 | Const field names must begin with upper-case letter | ✔ |
SA1304 | Non-private readonly fields must begin with upper-case letter | ✔ |
SA1305 ⁴ | Field names must not use Hungarian notation | |
SA1306 | Field names must begin with lower-case letter | ✔ |
SA1307 | Accessible fields must begin with upper-case letter | ✔ |
SA1308 | Variable names must not be prefixed | ✔ |
SA1309 | Field names must not begin with underscore | ✔ |
SA1310 | Field names must not contain underscore | ✔ |
SA1311 | Static readonly fields must begin with upper-case letter | ✔ |
SA1312 ³ | Variable names must begin with lower case letter | ✔ |
SA1313 ³ | Parameter names must begin with lower case letter | ✔ |
SA1314 ³ | The name of a C# type parameter does not begin with the capital letter T | ✔ |
SX1309 ² ³ | Field names must begin with underscore | ✔ |
SX1309S ² ³ | Static field names must begin with underscore | ✔ |
SA1400 | Access modifier must be declared | ✔ |
SA1401 | Fields must be private | |
SA1402 | File may only contain a single class | ✔ |
SA1403 | File may only contain a single namespace | |
SA1404 | Code analysis suppression must have justification | ✔ |
SA1405 | Debug.Assert must provide message text | |
SA1406 | Debug.Fail must provide message text | |
SA1407 | Arithmetic expressions must declare precedence | ✔ |
SA1408 | Conditional expressions must declare precedence | ✔ |
SA1410 | Remove delegate parenthesis when possible | ✔ |
SA1411 | Attribute constructor must not use unnecessary parenthesis | ✔ |
SA1412 ³ ⁴ | Store files as UTF-8 | ✔ |
SA1413 ³ | Use trailing comma in multi-line initializers | ✔ |
SA1500 | Braces for multi-line statements must not share line | ✔ |
SA1501 | Statement must not be on a single line | ✔ |
SA1502 | Element must not be on a single line | ✔ |
SA1503 | Braces must not be omitted | ✔ |
SA1504 | All accessors must be single-line or multi-line | ✔ |
SA1505 | Opening braces must not be followed by blank line | ✔ |
SA1506 | Element documentation headers must not be followed by blank line | ✔ |
SA1507 | Code must not contain multiple blank lines in a row | ✔ |
SA1508 | Closing braces must not be preceded by blank line | ✔ |
SA1509 | Opening braces must not be preceded by blank line | ✔ |
SA1510 | Chained statement blocks must not be preceded by blank line | ✔ |
SA1511 | While-do footer must not be preceded by blank line | ✔ |
SA1512 | Single-line comments must not be followed by blank line | ✔ |
SA1513 | Closing brace must be followed by blank line | ✔ |
SA1514 | Element documentation header must be preceded by blank line | ✔ |
SA1515 | Single-line com... |
1.1.0 Beta 6
Beta Release
Summary
- New features
- C# 7.2 Support (#2546)
- Bug fixes
- Other
Upgrade notices
Upgrading from StyleCop Classic
📝 This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
➡️ We now have a list of known changes in behavior relative to StyleCop Classic.
Upgrading from StyleCop Analyzers 1.0.0
Binaries
Analyzers
Table of Analyzers
The following analyzers are included in this release (all with Warning severity by default).
ID | Title | Code Fix |
---|---|---|
SA0001 ³ | All diagnostics of XML documentation comments has been disabled due to the current project configuration | |
SA0002 ³ | The stylecop.json settings file could not be loaded due to a deserialization error | |
SA1000 | Keywords must be spaced correctly | ✔ |
SA1001 | Commas must be spaced correctly | ✔ |
SA1002 | Semicolons must be spaced correctly | ✔ |
SA1003 | Symbols must be spaced correctly | ✔ |
SA1004 | Documentation lines must begin with single space | ✔ |
SA1005 | Single line comments must begin with single space | ✔ |
SA1006 | Preprocessor keywords must not be preceded by space | ✔ |
SA1007 | Operator keyword must be followed by space | ✔ |
SA1008 | Opening parenthesis must be spaced correctly | ✔ |
SA1009 | Closing parenthesis must be spaced correctly | ✔ |
SA1010 | Opening square brackets must be spaced correctly | ✔ |
SA1011 | Closing square brackets must be spaced correctly | ✔ |
SA1012 | Opening braces must be spaced correctly | ✔ |
SA1013 | Closing braces must be spaced correctly | ✔ |
SA1014 | Opening generic brackets must be spaced correctly | ✔ |
SA1015 | Closing generic brackets must be spaced correctly | ✔ |
SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
SA1018 | Nullable type symbols must be spaced correctly | ✔ |
SA1019 | Member access symbols must be spaced correctly | ✔ |
SA1020 | Increment decrement symbols must be spaced correctly | ✔ |
SA1021 | Negative signs must be spaced correctly | ✔ |
SA1022 | Positive signs must be spaced correctly | ✔ |
SA1023 | Dereference and access of symbols must be spaced correctly | ✔ |
SA1024 | Colons Must Be Spaced Correctly | ✔ |
SA1025 | Code must not contain multiple whitespace in a row | ✔ |
SA1026 | Code must not contain space after new keyword in implicitly typed array allocation | ✔ |
SA1027 | Tabs must not be used | ✔ |
SA1028 ³ | Code must not contain trailing whitespace | ✔ |
SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
SA1101 | Prefix local calls with this | ✔ |
SA1102 | Query clause must follow previous clause | ✔ |
SA1103 | Query clauses must be on separate lines or all on one line | ✔ |
SA1104 | Query clause must begin on new line when previous clause spans multiple lines | ✔ |
SA1105 | Query clauses spanning multiple lines must begin on own line | ✔ |
SA1106 | Code must not contain empty statements | ✔ |
SA1107 | Code must not contain multiple statements on one line | ✔ |
SA1108 | Block statements must not contain embedded comments | |
SA1110 | Opening parenthesis or bracket must be on declaration line | ✔ |
SA1111 | Closing parenthesis must be on line of last parameter | ✔ |
SA1112 | Closing parenthesis must be on line of opening parenthesis | ✔ |
SA1113 | Comma must be on the same line as previous parameter | ✔ |
SA1114 | Parameter list must follow declaration | |
SA1115 | Parameter must follow comma | |
SA1116 | Split parameters must start on line after declaration | ✔ |
SA1117 | Parameters must be on same line or separate lines | |
SA1118 | Parameter must not span multiple lines | |
SA1119 | Statement must not use unnecessary parenthesis | ✔ |
SA1120 | Comments must contain text | ✔ |
SA1121 | Use built-in type alias | ✔ |
SA1122 | Use string.Empty for empty strings | ✔ |
SA1123 | Do not place regions within elements | ✔ |
SA1124 | Do not use regions | ✔ |
SA1125 | Use shorthand for nullable types | ✔¹ |
SA1127 ³ | Generic type constraints must be on their own line | ✔ |
SA1128 ³ | Put constructor initializers on their own line | ✔ |
SA1129 ³ | Do not use default value type constructor | ✔ |
SA1130 ³ | Use lambda syntax | ✔ |
SA1131 ³ | Use readable conditions | ✔ |
SA1132 ³ | Do not combine fields | ✔ |
SA1133 ³ | Do not combine attributes | ✔ |
SA1134 ³ | Attributes must not share line | ✔ |
SA1136 ³ | Multiple enum values are placed on the same line of code | ✔ |
SA1137 ³ | Elements should have the same indentation | ✔ |
SX1101 ² ³ | Do not prefix local calls with 'this.' | ✔ |
SA1200 | Using directives must be placed within namespace | ✔ |
SA1201 | Elements must appear in the correct order | |
SA1202 | Elements must be ordered by access | |
SA1203 | Constants must appear before fields | |
SA1204 | Static elements must appear before instance elements | |
SA1205 | Partial elements must declare access | ✔ |
SA1206 | Declaration keywords must follow order | |
SA1207 | Protected must come before internal | ✔ |
SA1208 | System using directives must be placed before other using directives | ✔ |
SA1209 | Using alias directives must be placed after other using directives | ✔ |
SA1210 | Using directives must be ordered alphabetically by namespace | ✔ |
SA1211 | Using alias directives must be ordered alphabetically by alias name | ✔ |
SA1212 | Property accessors must follow order | ✔ |
SA1213 | Event accessors must follow order | ✔ |
SA1214 | Readonly fields must appear before non-readonly fields | |
SA1216 ³ | Using static directives must be placed after other using directives | ✔ |
SA1217 ³ | Using static directives must be ordered alphabetically | ✔ |
SA1300 | Element must begin with upper-case letter | ✔ |
SA1302 | Interface names must begin with I | ✔ |
SA1303 | Const field names must begin with upper-case letter | ✔ |
SA1304 | Non-private readonly fields must begin with upper-case letter | ✔ |
SA1305 ⁴ | Field names must not use Hungarian notation | |
SA1306 | Field names must begin with lower-case letter | ✔ |
SA1307 | Accessible fields must begin with upper-case letter | ✔ |
SA1308 | Variable names must not be prefixed | ✔ |
SA1309 | Field names must not begin with underscore | ✔ |
SA1310 | Field names must not contain underscore | ✔ |
SA1311 | Static readonly fields must begin with upper-case letter | ✔ |
SA1312 ³ | Variable names must begin with lower case letter | ✔ |
SA1313 ³ | Parameter names must begin with lower case letter | ✔ |
SA1314 ³ | The name of a C# type parameter does not begin with the capital letter T | ✔ |
SX1309 ² ³ | Field names must begin with underscore | ✔ |
SX1309S ² ³ | Static field names must begin with underscore | ✔ |
SA1400 | Access modifier must be declared | ✔ |
SA1401 | Fields must be private | |
SA1402 | File may only contain a single class | ✔ |
SA1403 | File may only contain a single namespace | |
SA1404 | Code analysis suppression must have justification | ✔ |
SA1405 | Debug.Assert must provide message text | |
SA1406 | Debug.Fail must provide message text | |
SA1407 | Arithmetic expressions must declare precedence | ✔ |
SA1408 | Conditional expressions must declare precedence | ✔ |
SA1410 | Remove delegate parenthesis when possible | ✔ |
SA1411 | Attribute constructor must not use unnecessary parenthesis | ✔ |
SA1412 ³ ⁴ | Store files as UTF-8 | ✔ |
SA1413 ³ | Use trailing comma in multi-line initializers | ✔ |
SA1500 | Braces for multi-line statements must not share line | ✔ |
SA1501 | Statement must not be on a single line | ✔ |
SA1502 | Element must not be on a single line | ✔ |
SA1503 | Braces must not be omitted | ✔ |
SA1504 | All accessors must be single-line or multi-line | ✔ |
SA1505 | Opening braces must not be followed by blank line | ✔ |
SA1506 | Element documentation headers must not be followed by blank line | ✔ |
SA1507 | Code must not contain multiple blank lines in a row | ✔ |
SA1508 | Closing braces must not be preceded by blank line | ✔ |
SA1509 | Opening braces must not be preceded by blank line | ✔ |
SA1510 | Chained statement blocks must not be preceded by blank line | ✔ |
SA1511 | While-do footer must not be preceded by blank line | ✔ |
SA1512 | Single-line comments must not be followed by blank line | ✔ |
SA1513 | Closing brace must be followed by blank line | ✔ |
SA1514 | Element documentation header must be preceded by blank line | ✔ |
SA1515 | Single-line comment must be preceded by blank line | ✔ |
SA1516 | Elements must be separated by blank line | ✔ |
SA1517 | Code must not contain blank lines at start of file | ✔ |
SA1518 | Use line endings correctly at end of file | ✔ |
SA1519 ³ | Braces must... |
1.1.0 Beta 5
This release was withdrawn due to #2607.
1.1.0 Beta 4
Beta Release
Summary
- New features
- C# 7.1 support (#2423) 🎉
- General improvements
- Use 'should' instead of 'must' for warnings (#2036)
- Bug fixes
- Spacing: SA1000 (#2419)
- Ordering: SA1200 code fix (#2363)
- Naming: SA1308 code fix (#2338)
- Maintainability: SA1119 (#2372)
- Layout: SA1515 (#2462)
- Documentation: File headers code fix (#2421), SA1604 (#2443), SA1605 (#2450), SA1609 (#2451), SA1611 (#2444), SA1612 (#2452), SA1615 (#2445), SA1618 (#2446), SA1619 (#2453)
- Other
- LightJson bug fixes (#2440)
Upgrade notices
Upgrading from StyleCop Classic
📝 This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
➡️ We now have a list of known changes in behavior relative to StyleCop Classic.
Upgrading from StyleCop Analyzers 1.0.0
Binaries
Analyzers
Table of Analyzers
The following analyzers are included in this release (all with Warning severity by default).
ID | Title | Code Fix |
---|---|---|
SA0001 ³ | All diagnostics of XML documentation comments has been disabled due to the current project configuration | |
SA0002 ³ | The stylecop.json settings file could not be loaded due to a deserialization error | |
SA1000 | Keywords must be spaced correctly | ✔ |
SA1001 | Commas must be spaced correctly | ✔ |
SA1002 | Semicolons must be spaced correctly | ✔ |
SA1003 | Symbols must be spaced correctly | ✔ |
SA1004 | Documentation lines must begin with single space | ✔ |
SA1005 | Single line comments must begin with single space | ✔ |
SA1006 | Preprocessor keywords must not be preceded by space | ✔ |
SA1007 | Operator keyword must be followed by space | ✔ |
SA1008 | Opening parenthesis must be spaced correctly | ✔ |
SA1009 | Closing parenthesis must be spaced correctly | ✔ |
SA1010 | Opening square brackets must be spaced correctly | ✔ |
SA1011 | Closing square brackets must be spaced correctly | ✔ |
SA1012 | Opening braces must be spaced correctly | ✔ |
SA1013 | Closing braces must be spaced correctly | ✔ |
SA1014 | Opening generic brackets must be spaced correctly | ✔ |
SA1015 | Closing generic brackets must be spaced correctly | ✔ |
SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
SA1018 | Nullable type symbols must be spaced correctly | ✔ |
SA1019 | Member access symbols must be spaced correctly | ✔ |
SA1020 | Increment decrement symbols must be spaced correctly | ✔ |
SA1021 | Negative signs must be spaced correctly | ✔ |
SA1022 | Positive signs must be spaced correctly | ✔ |
SA1023 | Dereference and access of symbols must be spaced correctly | ✔ |
SA1024 | Colons Must Be Spaced Correctly | ✔ |
SA1025 | Code must not contain multiple whitespace in a row | ✔ |
SA1026 | Code must not contain space after new keyword in implicitly typed array allocation | ✔ |
SA1027 | Tabs must not be used | ✔ |
SA1028 ³ | Code must not contain trailing whitespace | ✔ |
SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
SA1101 | Prefix local calls with this | ✔ |
SA1102 | Query clause must follow previous clause | ✔ |
SA1103 | Query clauses must be on separate lines or all on one line | ✔ |
SA1104 | Query clause must begin on new line when previous clause spans multiple lines | ✔ |
SA1105 | Query clauses spanning multiple lines must begin on own line | ✔ |
SA1106 | Code must not contain empty statements | ✔ |
SA1107 | Code must not contain multiple statements on one line | ✔ |
SA1108 | Block statements must not contain embedded comments | |
SA1110 | Opening parenthesis or bracket must be on declaration line | ✔ |
SA1111 | Closing parenthesis must be on line of last parameter | ✔ |
SA1112 | Closing parenthesis must be on line of opening parenthesis | ✔ |
SA1113 | Comma must be on the same line as previous parameter | ✔ |
SA1114 | Parameter list must follow declaration | |
SA1115 | Parameter must follow comma | |
SA1116 | Split parameters must start on line after declaration | ✔ |
SA1117 | Parameters must be on same line or separate lines | |
SA1118 | Parameter must not span multiple lines | |
SA1119 | Statement must not use unnecessary parenthesis | ✔ |
SA1120 | Comments must contain text | ✔ |
SA1121 | Use built-in type alias | ✔ |
SA1122 | Use string.Empty for empty strings | ✔ |
SA1123 | Do not place regions within elements | ✔ |
SA1124 | Do not use regions | ✔ |
SA1125 | Use shorthand for nullable types | ✔¹ |
SA1127 ³ | Generic type constraints must be on their own line | ✔ |
SA1128 ³ | Put constructor initializers on their own line | ✔ |
SA1129 ³ | Do not use default value type constructor | ✔ |
SA1130 ³ | Use lambda syntax | ✔ |
SA1131 ³ | Use readable conditions | ✔ |
SA1132 ³ | Do not combine fields | ✔ |
SA1133 ³ | Do not combine attributes | ✔ |
SA1134 ³ | Attributes must not share line | ✔ |
SA1136 ³ | Multiple enum values are placed on the same line of code | ✔ |
SA1137 ³ | Elements should have the same indentation | ✔ |
SX1101 ² ³ | Do not prefix local calls with 'this.' | ✔ |
SA1200 | Using directives must be placed within namespace | ✔ |
SA1201 | Elements must appear in the correct order | |
SA1202 | Elements must be ordered by access | |
SA1203 | Constants must appear before fields | |
SA1204 | Static elements must appear before instance elements | |
SA1205 | Partial elements must declare access | ✔ |
SA1206 | Declaration keywords must follow order | |
SA1207 | Protected must come before internal | ✔ |
SA1208 | System using directives must be placed before other using directives | ✔ |
SA1209 | Using alias directives must be placed after other using directives | ✔ |
SA1210 | Using directives must be ordered alphabetically by namespace | ✔ |
SA1211 | Using alias directives must be ordered alphabetically by alias name | ✔ |
SA1212 | Property accessors must follow order | ✔ |
SA1213 | Event accessors must follow order | ✔ |
SA1214 | Readonly fields must appear before non-readonly fields | |
SA1216 ³ | Using static directives must be placed after other using directives | ✔ |
SA1217 ³ | Using static directives must be ordered alphabetically | ✔ |
SA1300 | Element must begin with upper-case letter | ✔ |
SA1302 | Interface names must begin with I | ✔ |
SA1303 | Const field names must begin with upper-case letter | ✔ |
SA1304 | Non-private readonly fields must begin with upper-case letter | ✔ |
SA1305 ⁴ | Field names must not use Hungarian notation | |
SA1306 | Field names must begin with lower-case letter | ✔ |
SA1307 | Accessible fields must begin with upper-case letter | ✔ |
SA1308 | Variable names must not be prefixed | ✔ |
SA1309 | Field names must not begin with underscore | ✔ |
SA1310 | Field names must not contain underscore | ✔ |
SA1311 | Static readonly fields must begin with upper-case letter | ✔ |
SA1312 ³ | Variable names must begin with lower case letter | ✔ |
SA1313 ³ | Parameter names must begin with lower case letter | ✔ |
SA1314 ³ | The name of a C# type parameter does not begin with the capital letter T | ✔ |
SX1309 ² ³ | Field names must begin with underscore | ✔ |
SX1309S ² ³ | Static field names must begin with underscore | ✔ |
SA1400 | Access modifier must be declared | ✔ |
SA1401 | Fields must be private | |
SA1402 | File may only contain a single class | ✔ |
SA1403 | File may only contain a single namespace | |
SA1404 | Code analysis suppression must have justification | ✔ |
SA1405 | Debug.Assert must provide message text | |
SA1406 | Debug.Fail must provide message text | |
SA1407 | Arithmetic expressions must declare precedence | ✔ |
SA1408 | Conditional expressions must declare precedence | ✔ |
SA1410 | Remove delegate parenthesis when possible | ✔ |
SA1411 | Attribute constructor must not use unnecessary parenthesis | ✔ |
SA1412 ³ ⁴ | Store files as UTF-8 | ✔ |
SA1413 ³ | Use trailing comma in multi-line initializers | ✔ |
SA1500 | Braces for multi-line statements must not share line | ✔ |
SA1501 | Statement must not be on a single line | ✔ |
SA1502 | Element must not be on a single line | ✔ |
SA1503 | Braces must not be omitted | ✔ |
SA1504 | All accessors must be single-line or multi-line | ✔ |
SA1505 | Opening braces must not be followed by blank line | ✔ |
SA1506 | Element documentation headers must not be followed by blank line | ✔ |
SA1507 | Code must not contain multiple blank lines in a row | ✔ |
SA1508 | Closing braces must not be preceded by blank line | ✔ |
SA1509 | Opening braces must not be preceded by blank line | ✔ |
SA1510 | Chained statement blocks must not be preceded by blank line | ✔ |
SA1511 | While-do footer must not be preceded by blank line | ✔ |
SA1512 | Single-line comments must not be followed by blank line | ✔ |
SA1513 | Closing brace must be followed by blank line | ✔ |
SA1514 | Element documentation header must be preceded by blank line | ✔ |
SA1515 | Single-line comment must be preceded by blank line | ✔ |
SA1516 | Elements must be separated by blank line | ✔ |
SA1517 | Code must not contain blank lines at start of file | ✔ |
SA1518 | Use line endings correctly at end of file | ... |
1.1.0 Beta 3
Bug Fix Update
📝 This is a quick bug fix for an important issue from 1.1.0-beta002. For the rest of today's release notes, please see the 1.1.0-beta002 release.
Summary
- Bug fixes
- Spacing: SA1009 (#2409)
Acknowledgements
Thank you goes to @RomanDidenko who first reported and helped solve this important bug.
1.1.0 Beta 2
Beta Release
Summary
- New features
- C# 7 support 🎉
- Rule modifications
- SA1413 now reported for enum members (#2239)
- Bug fixes
- Other
- Use LightJson instead of Json.NET to resolve problems in some usage scenarios (inherited from release 1.0.2)
Upgrade notices
Upgrading from StyleCop Classic
📝 This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
➡️ We now have a list of known changes in behavior relative to StyleCop Classic.
Upgrading from StyleCop Analyzers 1.0.0
Binaries
Analyzers
Table of Analyzers
The following analyzers are included in this release (all with Warning severity by default).
ID | Title | Code Fix |
---|---|---|
SA0001 ³ | All diagnostics of XML documentation comments has been disabled due to the current project configuration | |
SA0002 ³ | The stylecop.json settings file could not be loaded due to a deserialization error | |
SA1000 | Keywords must be spaced correctly | ✔ |
SA1001 | Commas must be spaced correctly | ✔ |
SA1002 | Semicolons must be spaced correctly | ✔ |
SA1003 | Symbols must be spaced correctly | ✔ |
SA1004 | Documentation lines must begin with single space | ✔ |
SA1005 | Single line comments must begin with single space | ✔ |
SA1006 | Preprocessor keywords must not be preceded by space | ✔ |
SA1007 | Operator keyword must be followed by space | ✔ |
SA1008 | Opening parenthesis must be spaced correctly | ✔ |
SA1009 | Closing parenthesis must be spaced correctly | ✔ |
SA1010 | Opening square brackets must be spaced correctly | ✔ |
SA1011 | Closing square brackets must be spaced correctly | ✔ |
SA1012 | Opening braces must be spaced correctly | ✔ |
SA1013 | Closing braces must be spaced correctly | ✔ |
SA1014 | Opening generic brackets must be spaced correctly | ✔ |
SA1015 | Closing generic brackets must be spaced correctly | ✔ |
SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
SA1018 | Nullable type symbols must be spaced correctly | ✔ |
SA1019 | Member access symbols must be spaced correctly | ✔ |
SA1020 | Increment decrement symbols must be spaced correctly | ✔ |
SA1021 | Negative signs must be spaced correctly | ✔ |
SA1022 | Positive signs must be spaced correctly | ✔ |
SA1023 | Dereference and access of symbols must be spaced correctly | ✔ |
SA1024 | Colons Must Be Spaced Correctly | ✔ |
SA1025 | Code must not contain multiple whitespace in a row | ✔ |
SA1026 | Code must not contain space after new keyword in implicitly typed array allocation | ✔ |
SA1027 | Tabs must not be used | ✔ |
SA1028 ³ | Code must not contain trailing whitespace | ✔ |
SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
SA1101 | Prefix local calls with this | ✔ |
SA1102 | Query clause must follow previous clause | ✔ |
SA1103 | Query clauses must be on separate lines or all on one line | ✔ |
SA1104 | Query clause must begin on new line when previous clause spans multiple lines | ✔ |
SA1105 | Query clauses spanning multiple lines must begin on own line | ✔ |
SA1106 | Code must not contain empty statements | ✔ |
SA1107 | Code must not contain multiple statements on one line | ✔ |
SA1108 | Block statements must not contain embedded comments | |
SA1110 | Opening parenthesis or bracket must be on declaration line | ✔ |
SA1111 | Closing parenthesis must be on line of last parameter | ✔ |
SA1112 | Closing parenthesis must be on line of opening parenthesis | ✔ |
SA1113 | Comma must be on the same line as previous parameter | ✔ |
SA1114 | Parameter list must follow declaration | |
SA1115 | Parameter must follow comma | |
SA1116 | Split parameters must start on line after declaration | ✔ |
SA1117 | Parameters must be on same line or separate lines | |
SA1118 | Parameter must not span multiple lines | |
SA1119 | Statement must not use unnecessary parenthesis | ✔ |
SA1120 | Comments must contain text | ✔ |
SA1121 | Use built-in type alias | ✔ |
SA1122 | Use string.Empty for empty strings | ✔ |
SA1123 | Do not place regions within elements | ✔ |
SA1124 | Do not use regions | ✔ |
SA1125 | Use shorthand for nullable types | ✔¹ |
SA1127 ³ | Generic type constraints must be on their own line | ✔ |
SA1128 ³ | Put constructor initializers on their own line | ✔ |
SA1129 ³ | Do not use default value type constructor | ✔ |
SA1130 ³ | Use lambda syntax | ✔ |
SA1131 ³ | Use readable conditions | ✔ |
SA1132 ³ | Do not combine fields | ✔ |
SA1133 ³ | Do not combine attributes | ✔ |
SA1134 ³ | Attributes must not share line | ✔ |
SA1136 ³ | Multiple enum values are placed on the same line of code | ✔ |
SA1137 ³ | Elements should have the same indentation | ✔ |
SX1101 ² ³ | Do not prefix local calls with 'this.' | ✔ |
SA1200 | Using directives must be placed within namespace | ✔ |
SA1201 | Elements must appear in the correct order | |
SA1202 | Elements must be ordered by access | |
SA1203 | Constants must appear before fields | |
SA1204 | Static elements must appear before instance elements | |
SA1205 | Partial elements must declare access | ✔ |
SA1206 | Declaration keywords must follow order | |
SA1207 | Protected must come before internal | ✔ |
SA1208 | System using directives must be placed before other using directives | ✔ |
SA1209 | Using alias directives must be placed after other using directives | ✔ |
SA1210 | Using directives must be ordered alphabetically by namespace | ✔ |
SA1211 | Using alias directives must be ordered alphabetically by alias name | ✔ |
SA1212 | Property accessors must follow order | ✔ |
SA1213 | Event accessors must follow order | ✔ |
SA1214 | Readonly fields must appear before non-readonly fields | |
SA1216 ³ | Using static directives must be placed after other using directives | ✔ |
SA1217 ³ | Using static directives must be ordered alphabetically | ✔ |
SA1300 | Element must begin with upper-case letter | ✔ |
SA1302 | Interface names must begin with I | ✔ |
SA1303 | Const field names must begin with upper-case letter | ✔ |
SA1304 | Non-private readonly fields must begin with upper-case letter | ✔ |
SA1305 ⁴ | Field names must not use Hungarian notation | |
SA1306 | Field names must begin with lower-case letter | ✔ |
SA1307 | Accessible fields must begin with upper-case letter | ✔ |
SA1308 | Variable names must not be prefixed | ✔ |
SA1309 | Field names must not begin with underscore | ✔ |
SA1310 | Field names must not contain underscore | ✔ |
SA1311 | Static readonly fields must begin with upper-case letter | ✔ |
SA1312 ³ | Variable names must begin with lower case letter | ✔ |
SA1313 ³ | Parameter names must begin with lower case letter | ✔ |
SA1314 ³ | The name of a C# type parameter does not begin with the capital letter T | ✔ |
SX1309 ² ³ | Field names must begin with underscore | ✔ |
SX1309S ² ³ | Static field names must begin with underscore | ✔ |
SA1400 | Access modifier must be declared | ✔ |
SA1401 | Fields must be private | |
SA1402 | File may only contain a single class | ✔ |
SA1403 | File may only contain a single namespace | |
SA1404 | Code analysis suppression must have justification | ✔ |
SA1405 | Debug.Assert must provide message text | |
SA1406 | Debug.Fail must provide message text | |
SA1407 | Arithmetic expressions must declare precedence | ✔ |
SA1408 | Conditional expressions must declare precedence | ✔ |
SA1410 | Remove delegate parenthesis when possible | ✔ |
SA1411 | Attribute constructor must not use unnecessary parenthesis | ✔ |
SA1412 ³ ⁴ | Store files as UTF-8 | ✔ |
SA1413 ³ | Use trailing comma in multi-line initializers | ✔ |
SA1500 | Braces for multi-line statements must not share line | ✔ |
SA1501 | Statement must not be on a single line | ✔ |
SA1502 | Element must not be on a single line | ✔ |
SA1503 | Braces must not be omitted | ✔ |
SA1504 | All accessors must be single-line or multi-line | ✔ |
SA1505 | Opening braces must not be followed by blank line | ✔ |
SA1506 | Element documentation headers must not be followed by blank line | ✔ |
SA1507 | Code must not contain multiple blank lines in a row | ✔ |
SA1508 | Closing braces must not be preceded by blank line | ✔ |
SA1509 | Opening braces must not be preceded by blank line | ✔ |
SA1510 | Chained statement blocks must not be preceded by blank line | ✔ |
SA1511 | While-do footer must not be preceded by blank line | ✔ |
SA1512 | Single-line comments must not be followed by blank line | ✔ |
SA1513 | Closing brace must be followed by blank line | ✔ |
SA1514 | Element documentation header must be preceded by blank line | ✔ |
SA1515 | Single-line comment must be preceded by blank line | ✔ |
SA1516 | Elements must be separated by blank line | ✔ |
SA1517 | Code must not contain blank lines at start of file | ✔ |
SA1518 | Use line endings correctly at end of file | ✔ |
SA1519 ³ | Braces must not be omitted from multi-line child statement | ✔ |
SA1520 ³ | Use braces consist... |