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:
parent
0ed8ba828d
commit
738dc2c98c
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue