NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #224 most downloaded on NuGet
An implementation of StyleCop's rules using Roslyn analyzers and code fixes
Latest stable
1.3.180
Last release 3 days ago
19 Nov 2026
Ships unpredictably
gaps range from 8 days to 7.5 years
Nearly every release is documented
notes for 4 of 4 stable releases
2 versions withdrawn
withdrawn after publishing
127 years old
57 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
This is the first StyleCop.Analyzers release since 1.2.0-beta.556, and it's a big one. The project is active again: this release brings the analyzers
This is the first StyleCop.Analyzers release since 1.2.0-beta.556, and it's a big one. The project is active again: this release brings the analyzers up to date with every C# version from 10 through the C# 15 previews, clears a long backlog of bugs, and modernizes how the project is built, tested and shipped. Thank you to everyone who contributed code, reviews, translations and bug reports over the long gap. Many of the changes below started as community pull requests.
allows ref struct, C# 14 extension blocks and the field keyword, and C# 15 preview unions with the closed and safe modifiers. (#4142, #4139, #4137, #4163, #4148, #4191, #4193).editorconfig, and the docs explain how that works alongside stylecop.json. The documentation and rule status are published on GitHub Pages, and there are more translations of the code-fix documentation text (Czech, Dutch, Russian and others). (#4221, #4218, #3374, #3944, #3900, #4220)Upgrading may produce new or different diagnostics:
includeInferredTupleElementNames is off. Names the compiler infers are still checked only when that setting is on. (#4202)_ for foreach variables and using declarations. (#4203)file modifier as an access modifier. (#4198)protected readonly fields when SA1307 is enabled. (#4217)documentInterfaces setting values. (#3140).symbols.nupkg is gone, because PDBs are now embedded in the DLLs. (#4173)<details> <summary><b>Fixes</b> (52)</summary>
</details>
<details> <summary><b>Enhancements</b> (73)</summary>
</details>
<details> <summary><b>Documentation</b> (10)</summary>
stylecop.json schema to have correct default for headerDecoration. by @alexrp in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3842</details>
<details> <summary><b>Infrastructure and build</b> (80)</summary>
</details>
Full Changelog: https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.556...1.3.1-beta
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Latest Latest Compare
Latest
Latest
Compare
Nothing published for this version
Nothing published for this version
SA1135 (Using directives should be qualified) (#1761, documentation)
:memo: This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: StyleCop Analyzers 1.1.0 depends on Roslyn 1.2. Users working with Visual Studio 2015 will need to install Update 2 or newer to get this version.
<details><summary>Table of Analyzers</summary>
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 documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1629 | Documentation text should end with a period | ✔ |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
@0x084E @airbreather @berkeleybross @cfierro-glb @chriswbarrett @dlemstra @jeremymeng @jimmymain @jizc @JohanLarsson @lennylxx @morsiu @ninety7 @oatkins @pantosha @pdelvo @tdworshak @vweijsters
Finally, a special mention goes to @DustinCampbell for his work on the new MSBuildWorkspace, which greatly expanded the set of projects supported by StyleCopTester.
Spacing: SA1001 (#2468), SA1003 (#2471), SA1008 (#2472, #2568), SA1009 (#2475, #2494), SA1011 (#2289, #2564), SA1019
:memo: This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: StyleCop Analyzers 1.1.0 depends on Roslyn 1.2. Users working with Visual Studio 2015 will need to install Update 2 or newer to get this version.
<details><summary>Table of Analyzers</summary>
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 consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
This release was withdrawn due to #2607.
This release was withdrawn due to #2607.
Use 'should' instead of 'must' for warnings
:memo: This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: StyleCop Analyzers 1.1.0 depends on Roslyn 1.2. Users working with Visual Studio 2015 will need to install Update 2 or newer to get this version.
<details><summary>Table of Analyzers</summary>
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 consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
:memo: 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.
:memo: 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.
Thank you goes to @RomanDidenko who first reported and helped solve this important bug.
SA1413 now reported for enum members
:memo: This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: StyleCop Analyzers 1.1.0 depends on Roslyn 1.2. Users working with Visual Studio 2015 will need to install Update 2 or newer to get this version.
<details><summary>Table of Analyzers</summary>
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 consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
SA1136: Enum values should be on separate lines (#1854, SA1136.md)
{fileName} intrinsic variable for configuring file headers (#2110)allowConsecutiveUsings option to configure SA1519topLevelTypes configuration for SA1402 (#1756)documentationCulture configuration for documentation text (#1143)blankLinesBetweenUsingGroups (#1787)/apply option to StyleCopTester (#2017):memo: This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: StyleCop Analyzers 1.1.0 depends on Roslyn 1.2. Users working with Visual Studio 2015 will need to install Update 2 or newer to get this version.
<details><summary>Table of Analyzers</summary>
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 consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
List coming soon...
Fixes errors when using stylecop.json with .NET Core
See the release notes for 1.0.0 for general information about the 1.0.0 releases.
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
This release was withdrawn due to #2331
<details><summary>This release was withdrawn due to #2331</summary><p>
See the release notes for 1.0.0 for general information about the 1.0.0 releases.
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
</p></details>
This is the first stable release of StyleCop Analyzers. :tada:
This is the first stable release of StyleCop Analyzers. :tada:
Aside from the version numbers, no changes were made since the 1.0.0-rc3 release.
:memo: This section only applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
A list of known changes in behavior relative to StyleCop Classic is available to aid in the upgrade process.
:memo: This section only applies to users with an alpha or beta release of StyleCop Analyzers installed. Users with an RC release or newer do not need to take any special steps during upgrading.
Users upgrading from an earlier alpha or beta release of StyleCop Analyzers should first upgrade to 1.0.0 RC 3 according to those release notes, and then upgrade to this stable release.
<details><summary>Table of Analyzers</summary>
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| SA0000 ³ ⁴ | Workaround incomplete diagnostics in Visual Studio 2015 Update 1 | |
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
SA0000 (#1979, SA0000Roslyn7446Workaround.md)
:memo: This section applies to users upgrading from StyleCop Classic to StyleCop Analyzers.
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:memo: This section only applies to users upgrading directly to this release from version 1.0.0-beta014 or 1.0.0-beta015.
:warning: When upgrading to this package from 1.0.0-beta014 or 1.0.0-beta015, NuGet will fail to properly upgrade this package. To work around the problem, use either of the following approaches:
:warning: When upgrading to this package from 1.0.0-beta014 or 1.0.0-beta015, if your project includes a stylecop.json file, you may need to manually update your project after updating to this release. Detailed steps are provided in EnableConfiguration.md. For more information about why this change was made, see #1788.
<details><summary>Table of Analyzers</summary>
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| SA0000 ³ ⁴ | Workaround incomplete diagnostics in Visual Studio 2015 Update 1 | |
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
</details>
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Readability: SA1133 (#1878, #1879, #1882)
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: In some cases, NuGet will fail to properly upgrade this package. To work around the problem, use either of the following approaches:
:warning: If your project includes a stylecop.json file, you may need to manually update your project after updating to this release. Detailed steps are provided in EnableConfiguration.md. For more information about why this change was made, see #1788.
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Spacing: SA1002 (#1777), SA1003 (#1831), SA1008 (#1774), SA1009 (#1832, #1834), SA1027
:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: In some cases, NuGet will fail to properly upgrade this package. To work around the problem, use either of the following approaches:
:warning: If your project includes a stylecop.json file, you may need to manually update your project after updating to this release. Detailed steps are provided in EnableConfiguration.md. For more information about why this change was made, see #1788.
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1625 | Element documentation must not be copied and pasted | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Added ordering option elementOrder
elementOrdersystemUsingDirectivesFirstnewlineAtEndOfFile:arrow_right: We now have a list of known changes in behavior relative to StyleCop Classic.
:warning: If your project includes a stylecop.json file, you may need to manually update your project after updating to this release. Detailed steps are provided in EnableConfiguration.md. For more information about why this change was made, see #1788.
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Braces must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use braces consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1623 | Property summary documentation must match accessors | ✔ |
| SA1624 | Property summary documentation must omit accessor with restricted access | ✔ |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Added configuration option usingDirectivesPlacement
usingDirectivesPlacement:warning: If your project includes a stylecop.json file, you may need to manually update your project after updating to this release. Detailed steps are provided in EnableConfiguration.md. For more information about why this change was made, see #1788.
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 | ✔ |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Braces must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use braces consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Other: Performance improvements
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1627 ⁴ | Documentation text must not be empty | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Documentation rules: SA1637, SA1638, SA1640, SA1641, SA1649
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | ✔ |
| SA1638 | File header file name documentation must match file name | ✔ |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | ✔ |
| SA1641 | File header company name text must match | ✔ |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1649 | File name must match first type name | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Readability rules: SA1117, SA1129, SA1130, SA1132
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔¹ |
| SA1132 ³ | Do not combine fields | ✔ |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | ✔ |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1641 | File header company name text must match | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Spacing rules: SA1002 (#403, #1426), SA1009 (#684), SA1023 (#1457), SA1027 (#1246), SA1028
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1641 | File header company name text must match | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Documentation rules: SA1626, SA1635
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | ✔ |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | ✔ |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1641 | File header company name text must match | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Readability rules: SA1127, SA1128
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | ✔ |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | ✔ |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1636 | File header copyright text must match | ✔ |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1641 | File header company name text must match | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Documentation rules: SA1636, SA1641
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | ✔¹ |
| 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 | Static readonly elements must appear before static non-readonly elements | ✔ |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 ⁴ | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1636 | File header copyright text must match | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 ⁴ | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1641 | File header company name text must match | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop ⁴ This rule is not enabled by default
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
@DarkBond @DavidDeSloovere @EdwinEngelen @hvanbakel @jimevans @lumberjack4 @Maxwe11 @nbarbettini @Noryoko @oatkins @otac0n @pdelvo @test20150828 @vweijsters
NuGet: StyleCop.Analyzers 1.0.0-beta008
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | ✔ |
| 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 | ✔¹ |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Readability rules: SA1110, SA1111, SA1112, SA1113
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | ✔ |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Spacing rules: SA1009 (#1187), SA1013
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Ordering rules: SA1202 (#1155), SA1215
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Ordering rules: SA1202, SA1203, SA1204, SA1215
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| SA1215 | Instance readonly elements must appear before instance non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Spacing rules: SA1011 (#1082), SA1013
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| SA1200 | Using directives must be placed within namespace | |
| SA1201 | Elements must appear in the correct order | |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Spacing rules: SA1011, SA1012, SA1013, SA1014, SA1015, SA1019
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 curly brackets must be spaced correctly | ✔ |
| SA1013 | Closing curly brackets 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 | ✔ |
| 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| SA1200 | Using directives must be placed within namespace | |
| SA1201 | Elements must appear in the correct order | |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1648 | inheritdoc must be used with inheriting class | |
| SA1651 ³ | Do not use placeholder elements | ✔ |
| SA1652 ³ | Enable XML documentation output |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Support Visual Studio 2015 RTM :tada:
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 | ✔ |
| SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
| SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
| SA1018 | Nullable type 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 | ✔ |
| 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| SA1200 | Using directives must be placed within namespace | |
| SA1201 | Elements must appear in the correct order | |
| SA1205 | Partial elements must declare access | ✔ |
| SA1206 | Declaration keywords must follow order | |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
:memo: This is the final release which supports Visual Studio 2015 RC. Moving forward we will support only Visual Studio 2015 RTM.
:memo: This is the final release which supports Visual Studio 2015 RC. Moving forward we will support only Visual Studio 2015 RTM.
The following analyzers are included in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| 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 | ✔ |
| SA1016 | Opening attribute brackets must be spaced correctly | ✔ |
| SA1017 | Closing attribute brackets must be spaced correctly | ✔ |
| SA1018 | Nullable type 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 | ✔ |
| 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 | QueryClauseMustFollowPreviousClause | ✔ |
| SA1103 | QueryClausesMustBeOnSeparateLinesOrAllOnOneLine | ✔ |
| SA1104 | QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines | ✔ |
| SA1105 | QueryClausesSpanningMultipleLinesMustBeginOnOwnLine | ✔ |
| 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 | |
| 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 | ✔¹ |
| SA1200 | Using directives must be placed within namespace | |
| SA1201 | Elements must appear in the correct order | |
| SA1205 | Partial elements must declare access | ✔ |
| SA1206 | Declaration keywords must follow order | |
| 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 | Static readonly elements must appear before static non-readonly elements | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1505 | Opening curly brackets 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 curly brackets must not be preceded by blank line | ✔ |
| SA1509 | Opening curly brackets 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 curly bracket 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 | Code must not contain blank lines at end of file | ✔ |
| SA1519 ³ | Curly brackets must not be omitted from multi-line child statement | ✔ |
| SA1520 ³ | Use curly brackets consistently | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | ✔ |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1618 | Generic type parameters must be documented | |
| SA1619 | Generic type parameters must be documented partial class | |
| SA1620 | Generic type parameter documentation must match type parameters | |
| SA1621 | Generic type parameter documentation must declare parameter name | |
| SA1622 | Generic type parameter documentation must have text | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1633 | File must have header | |
| SA1634 | File header must show copyright | |
| SA1635 | File header must have copyright text | |
| SA1637 | File header must contain file name | |
| SA1638 | File header file name documentation must match file name | |
| SA1639 | File header must have summary | |
| SA1640 | File header must have valid company text | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1651 ³ | Do not use placeholder elements | ✔ |
¹ This code fix is provided by Visual Studio ² This "alternative" rule is not enabled by default ³ This rule is new for StyleCopAnalyzers, and isn't present in the original StyleCop
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Nothing published for this version
Nothing published for this version
Nothing published for this version
SA1028 (CodeMustNotContainTrailingWhitespace)
[ExportCodeFixProvider] (#803)<autogenerated as a trigger in a file header to skip file analysis (#833)The following analyzers are enabled by default in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| SA1000 | Keywords must be spaced correctly | ✔ |
| SA1001 | Commas must be spaced correctly | ✔ |
| SA1002 | Semicolons must be spaced correctly | ✔ |
| 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 | ✔ |
| SA1021 | Negative signs must be spaced correctly | ✔ |
| SA1022 | Positive signs must be spaced correctly | ✔ |
| 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 | |
| SA1106 | Code must not contain empty statements | |
| 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 | |
| SA1118 | Parameter must not span multiple lines | |
| SA1119 | Statement must not use unnecessary parenthesis | ✔ |
| 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 | |
| SA1201 | Elements must appear in the correct order | |
| SA1205 | Partial elements must declare access | ✔ |
| SA1212 | Property accessors must follow order | |
| SA1213 | Event accessors must follow order | |
| 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 | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets 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 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1507 | Code must not contain multiple blank lines in a row | ✔ |
| SA1509 | Opening curly brackets must not be preceded by blank line | ✔ |
| SA1513 | Closing curly bracket must be followed by blank line | ✔ |
| SA1516 | Elements must be separated by blank line | ✔ |
| SA1517 | Code must not contain blank lines at start of file | ✔ |
| SA1518 | Code must not contain blank lines at end of file | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | ✔ |
| SA1610 | Property documentation must have value text | ✔ |
| SA1611 | Element parameters must be documented | |
| SA1612 | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | ✔ |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
| SA1651 | Do not use placeholder elements | ✔ |
The following analyzers are provided to implement "alternate configurations" to some of the reference rules above.
| ID | Title | Code Fix |
|---|---|---|
| SX1309 | Field names must begin with underscore | ✔ |
| SX1309S | Static field names must begin with underscore | ✔ |
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Update to the "RC2" release of Roslyn, which matches Visual Studio 2015 RC: #712
The following analyzers are enabled by default in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| SA1000 | Keywords must be spaced correctly | ✔ |
| SA1001 | Commas must be spaced correctly | ✔ |
| SA1002 | Semicolons must be spaced correctly | ✔ |
| 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 | ✔ |
| SA1021 | Negative signs must be spaced correctly | ✔ |
| SA1022 | Positive signs must be spaced correctly | ✔ |
| SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
| SA1101 | Prefix local calls with this | ✔ |
| SA1102 | Query clause must follow previous clause | |
| SA1106 | Code must not contain empty statements | |
| 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 | |
| SA1119 | Statement must not use unnecessary parenthesis | ✔ |
| 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 | |
| SA1201 | Elements must appear in the correct order | |
| SA1205 | Partial elements must declare access | ✔ |
| SA1212 | Property accessors must follow order | |
| SA1213 | Event accessors must follow order | |
| SA1300 | Element must begin with upper-case letter | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets for multi-line statements must not share line | |
| SA1503 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1507 | Code must not contain multiple blank lines in a row | ✔ |
| SA1509 | Opening curly brackets must not be preceded by blank line | ✔ |
| SA1513 | Closing curly bracket must be followed by blank line | ✔ |
| SA1516 | Elements must be separated by blank line | ✔ |
| SA1517 | Code must not contain blank lines at start of file | ✔ |
| SA1518 | Code must not contain blank lines at end of file | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | |
| SA1610 | Property documentation must have value text | |
| SA1611 | Element parameters must be documented | |
| SA1612 (new) | Element parameter documentation must match element parameters | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Automatically detects many generated code files, and automatically suppresses style warnings in these contexts
Compared to Alpha 4 we have:
The following analyzers are enabled by default in this release (all with Warning severity by default).
| ID | Title | Code Fix |
|---|---|---|
| SA1000 | Keywords must be spaced correctly | ✔ |
| SA1001 | Commas must be spaced correctly | ✔ |
| SA1002 | Semicolons must be spaced correctly | ✔ |
| 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 | ✔ |
| SA1021 | Negative signs must be spaced correctly | ✔ |
| SA1022 | Positive signs must be spaced correctly | ✔ |
| SA1100 | Do not prefix calls with base unless local implementation exists | ✔ |
| SA1101 | Prefix local calls with this | ✔ |
| SA1102 | Query clause must follow previous clause | |
| SA1106 | Code must not contain empty statements | |
| 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 | |
| SA1119 | Statement must not use unnecessary parenthesis | ✔ |
| 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 | |
| SA1201 | Elements must appear in the correct order | |
| SA1205 | Partial elements must declare access | ✔ |
| SA1212 | Property accessors must follow order | |
| SA1213 | Event accessors must follow order | |
| SA1300 | Element must begin with upper-case letter | |
| SA1301 | Element must begin with lower-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 | ✔ |
| 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 | ✔ |
| 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 | ✔ |
| SA1500 | Curly brackets for multi-line statements must not share line | |
| SA1503 | Curly brackets must not be omitted | ✔ |
| SA1504 | All accessors must be single-line or multi-line | |
| SA1507 | Code must not contain multiple blank lines in a row | ✔ |
| SA1509 | Opening curly brackets must not be preceded by blank line | ✔ |
| SA1513 | Closing curly bracket must be followed by blank line | ✔ |
| SA1516 | Elements must be separated by blank line | ✔ |
| SA1517 | Code must not contain blank lines at start of file | ✔ |
| SA1518 | Code must not contain blank lines at end of file | ✔ |
| SA1600 | Elements must be documented | |
| SA1601 | Partial elements must be documented | |
| SA1602 | Enumeration items must be documented | |
| SA1603 | Documentation must contain valid XML | |
| SA1604 | Element documentation must have summary | |
| SA1605 | Partial element documentation must have summary | |
| SA1606 | Element documentation must have summary text | |
| SA1607 | Partial element documentation must have summary text | |
| SA1608 | Element documentation must not have default summary | |
| SA1609 | Property documentation must have value | |
| SA1610 | Property documentation must have value text | |
| SA1611 | Element parameters must be documented | |
| SA1613 | Element parameter documentation must declare parameter name | |
| SA1614 | Element parameter documentation must have text | |
| SA1615 | Element return value must be documented | |
| SA1616 | Element return value documentation must have text | |
| SA1617 | Void return value must not be documented | |
| SA1626 | Single-line comments must not use documentation style slashes | |
| SA1642 | Constructor summary documentation must begin with standard text | ✔ |
| SA1643 | Destructor summary documentation must begin with standard text | ✔ |
Thank you goes to all of the following users, who contributed feedback, bug reports, code submissions, testing, and reviews which helped in this release. In alphabetical order by username. This list does not include people who contacted us through other channels, but your feedback is no less valuable so we thank you as well.
Nothing published for this version
This release fixes a major usability bug (#468) with SA1101 (PrefixLocalCallsWithThis). See the release notes for 1.0.0 Alpha 2 for more information a
This release fixes a major usability bug (#468) with SA1101 (PrefixLocalCallsWithThis). See the release notes for 1.0.0 Alpha 2 for more information about today's release(s).
This is a feature and bug-fix update. Seven new StyleCop analysis rules have been implemented, and a few bugs identified in previous rules have been c
This is a feature and bug-fix update. Seven new StyleCop analysis rules have been implemented, and a few bugs identified in previous rules have been corrected.
The following rules are implemented as part of this release. Rules in bold are new for this release.
The following rules are implemented as part of this release.
The following rules are implemented as part of this release.
One column per quarter.