Skip to content

Commit 6e47421

Browse files
committed
Reserve LuceneDev6001-6003 and add initial entries for string/span/char analyzer rules
1 parent 37e7a05 commit 6e47421

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
### New Rules
22

3-
| Rule ID | Category | Severity | Notes |
4-
| ------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
5-
| LuceneDev1007 | Design | Warning | Generic Dictionary<TKey, TValue> indexer should not be used to retrieve values because it may throw KeyNotFoundException (value type value) |
6-
| LuceneDev1008 | Design | Warning | Generic Dictionary<TKey, TValue> indexer should not be used to retrieve values because it may throw KeyNotFoundException (reference type value) |
7-
| LuceneDev6000 | Usage | Info | IDictionary indexer may be used to retrieve values, but must be checked for null before using the value |
8-
| LuceneDev6001 | Usage | Error | String overloads of StartsWith/EndsWith/IndexOf/LastIndexOf must be called with StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase |
9-
| LuceneDev6002 | Usage | Warning | Span overloads of StartsWith/EndsWith/IndexOf/LastIndexOf should not pass non-Ordinal StringComparison |
10-
| LuceneDev6003 | Usage | Info | Single-character string arguments should use the char overload of StartsWith/EndsWith/IndexOf/LastIndexOf instead of a string |
3+
Rule ID | Category | Severity | Notes
4+
---------------|----------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------
5+
LuceneDev1007 | Design | Warning | Generic Dictionary<TKey, TValue> indexer should not be used to retrieve values because it may throw KeyNotFoundException (value type value)
6+
LuceneDev1008 | Design | Warning | Generic Dictionary<TKey, TValue> indexer should not be used to retrieve values because it may throw KeyNotFoundException (reference type value)
7+
LuceneDev6000 | Usage | Info | IDictionary indexer may be used to retrieve values, but must be checked for null before using the value
8+
LuceneDev6001 | Usage | Error | String overloads of StartsWith/EndsWith/IndexOf/LastIndexOf must be called with StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase
9+
LuceneDev6002 | Usage | Warning | Span overloads of StartsWith/EndsWith/IndexOf/LastIndexOf should not pass non-Ordinal StringComparison
10+
LuceneDev6003 | Usage | Info | Single-character string arguments should use the char overload of StartsWith/EndsWith/IndexOf/LastIndexOf instead of a string

0 commit comments

Comments
 (0)