Skip to content

Commit 47801cc

Browse files
authored
Merge pull request #3765 from bjornhellander/feature/sa1025-doc-3684
Update SA1025 documentation to reflect handling of multiple spaces preceding a symbol
2 parents f139428 + b281c18 commit 47801cc

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1025CodeMustNotContainMultipleWhitespaceInARow.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ namespace StyleCop.Analyzers.SpacingRules
1717
/// </summary>
1818
/// <remarks>
1919
/// <para>A violation of this rule occurs whenever the code contains multiple whitespace characters in a row, unless
20-
/// the characters come at the beginning or end of a line of code, following a comma or semicolon or preceding a
21-
/// symbol.</para>
20+
/// the characters come at the beginning or end of a line of code, or following a comma or semicolon.</para>
2221
/// </remarks>
2322
[DiagnosticAnalyzer(LanguageNames.CSharp)]
2423
internal class SA1025CodeMustNotContainMultipleWhitespaceInARow : DiagnosticAnalyzer

documentation/KnownChanges.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,14 @@ StyleCop Classic allowed multiple spaces to precede a comment placed at the end
123123
int x; // comment
124124
```
125125

126-
StyleCop Analyzers does not currently make an exception to the SA1025 rule for this case, although this decision is
127-
still under review.
126+
It also allowed multiple spaces preceding a symbol, such as in the second line of the following code:
127+
128+
```csharp
129+
int xyz = 1;
130+
int w = 1;
131+
```
132+
133+
StyleCop Analyzers does not currently make an exception to the SA1025 rule for these cases.
128134

129135
## Readability Rules
130136

documentation/SA1025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The code contains multiple whitespace characters in a row.
2222
## Rule description
2323

2424
A violation of this rule occurs whenever the code contains multiple whitespace characters in a row, unless the
25-
characters come at the beginning or end of a line of code, following a comma or semicolon or preceding a symbol.
25+
characters come at the beginning or end of a line of code, or following a comma or semicolon.
2626

2727
## How to fix violations
2828

0 commit comments

Comments
 (0)