Skip to content

Commit bb3a049

Browse files
committed
Rule removal proposal
1 parent b3d8f73 commit bb3a049

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ and adheres to a project-specific [Versioning](/README.md).
1616
- S6575: Use "TimeZoneInfo.FindSystemTimeZoneById" without converting the timezones with "TimezoneConverter"
1717
- S6580: Use a format provider when parsing date and time
1818
- S6588: Use the "UnixEpoch" field instead of creating "DateTime" instances that point to the beginning of the Unix epoch
19-
- S6602: "Find" method should be used instead of the "FirstOrDefault" extension
20-
- S6603: The collection-specific "TrueForAll" method should be used instead of the "All" extension
21-
- S6605: Collection-specific "Exists" method should be used instead of the "Any" extension
2219
- S6607: The collection should be filtered before sorting by using "Where" before "OrderBy"
23-
- S6608: Prefer indexing instead of "Enumerable" methods on types implementing "IList"
2420
- S6609: "Min/Max" properties of "Set" types should be used instead of the "Enumerable" extension methods
2521
- S6610: "StartsWith" and "EndsWith" overloads that take a "char" should be used instead of the ones that take a "string"
2622
- S6612: The lambda parameter should be used instead of capturing arguments in "ConcurrentDictionary" methods

build/Neolution.CodeAnalysis.globalconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,22 @@ dotnet_diagnostic.CA2000.severity = warning
254254
; Deprecated code should eventually be removed, but it should not break the current build.
255255
dotnet_diagnostic.S1133.severity = suggestion
256256

257+
# S6602: "Find" method should be used instead of the "FirstOrDefault" extension
258+
; It seems like the potential performance gains here will be negative after .NET9: https://github.com/SonarSource/sonar-dotnet/issues/9664
259+
dotnet_diagnostic.S6602.severity = none
260+
261+
# S6603: The collection-specific "TrueForAll" method should be used instead of the "All" extension
262+
; Only has a performance gain with "large" collections and has a slightly different syntax when used with Arrays which could lead to confusion.
263+
dotnet_diagnostic.S6603.severity = none
264+
265+
# S6605: Collection-specific "Exists" method should be used instead of the "Any" extension
266+
; It seems like the potential performance gains here will be negative after .NET9: https://github.com/SonarSource/sonar-dotnet/issues/9665
267+
dotnet_diagnostic.S6605.severity = none
268+
269+
# S6608: Prefer indexing instead of "Enumerable" methods on types implementing "IList"
270+
; Better readability of `First()` and `Last()` are preferred over performance gains
271+
dotnet_diagnostic.S6608.severity = none
272+
257273
# S107: Methods should not have too many parameters
258274
dotnet_diagnostic.S107.severity = warning
259275

0 commit comments

Comments
 (0)