Skip to content

Commit 07fbce6

Browse files
committed
Document known behavior change in SA1303
See #2082
1 parent 83549ef commit 07fbce6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

documentation/KnownChanges.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,19 @@ StyleCop Analyzers adds enum members to the list of elements which should start
199199
SA1300 for violations. StyleCop Classic did not report any messages for enum members that did not start with an
200200
upper-case letter.
201201

202+
### SA1303
203+
204+
:warning: StyleCop Classic reports SA1303 for local constants that start with a lower-case letter, even though they are
205+
not fields. StyleCop Analyzers limits SA1303 to fields, so local constants follow the local-variable naming rules and
206+
do not produce a warning for this code ([#2082](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2082)):
207+
208+
```csharp
209+
public void SomeMethod()
210+
{
211+
const string url = "some constant value";
212+
}
213+
```
214+
202215
### SA1305
203216

204217
This rule is disabled by default in StyleCop Analyzers, but can be enabled by users via a rule set file.

0 commit comments

Comments
 (0)