mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-03-05 13:20:20 -05:00
Do not use Enumerable methods on indexable collections
This rule flags the Enumerable LINQ method calls on collections of types that have equivalent but more efficient properties to fetch the same data.
This commit is contained in:
@@ -194,7 +194,6 @@ dotnet_diagnostic.CA1819.severity = suggestion
|
||||
dotnet_diagnostic.CA1822.severity = suggestion
|
||||
dotnet_diagnostic.CA1823.severity = suggestion
|
||||
dotnet_diagnostic.CA1824.severity = suggestion
|
||||
dotnet_diagnostic.CA1826.severity = suggestion
|
||||
dotnet_diagnostic.CA1827.severity = suggestion
|
||||
dotnet_diagnostic.CA1829.severity = suggestion
|
||||
dotnet_diagnostic.CA1834.severity = suggestion
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Sonarr.Api.V3.System.Backup
|
||||
throw new BadRequestException("file must be provided");
|
||||
}
|
||||
|
||||
var file = files.First();
|
||||
var file = files[0];
|
||||
var extension = Path.GetExtension(file.FileName);
|
||||
|
||||
if (!ValidExtensions.Contains(extension))
|
||||
|
||||
Reference in New Issue
Block a user