Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ dotnet_diagnostic.CA1825.severity = suggestion
dotnet_diagnostic.CA1826.severity = suggestion

# CA1827: Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = suggestion
dotnet_diagnostic.CA1827.severity = warning

# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
dotnet_diagnostic.CA1828.severity = suggestion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3213,7 +3213,7 @@ internal PSModuleInfo LoadModuleManifest(
newManifestInfo.Prefix = resolvedCommandPrefix;
}

if (newManifestInfo.FileList == null || newManifestInfo.FileList.LongCount() == 0)
if (newManifestInfo.FileList == null || !newManifestInfo.FileList.Any())
{
if (fileList != null)
{
Expand All @@ -3224,7 +3224,7 @@ internal PSModuleInfo LoadModuleManifest(
}
}

if (newManifestInfo.ModuleList == null || newManifestInfo.ModuleList.LongCount() == 0)
if (newManifestInfo.ModuleList == null || !newManifestInfo.ModuleList.Any())
{
if (moduleList != null)
{
Expand All @@ -3235,7 +3235,7 @@ internal PSModuleInfo LoadModuleManifest(
}
}

if (newManifestInfo.CompatiblePSEditions == null || newManifestInfo.CompatiblePSEditions.LongCount() == 0)
if (newManifestInfo.CompatiblePSEditions == null || !newManifestInfo.CompatiblePSEditions.Any())
{
if (compatiblePSEditions != null)
{
Expand All @@ -3248,7 +3248,7 @@ internal PSModuleInfo LoadModuleManifest(
newManifestInfo.ProcessorArchitecture = requiredProcessorArchitecture;
}

if (newManifestInfo.RequiredAssemblies == null || newManifestInfo.RequiredAssemblies.LongCount() == 0)
if (newManifestInfo.RequiredAssemblies == null || !newManifestInfo.RequiredAssemblies.Any())
{
if (assemblyList != null)
{
Expand All @@ -3259,7 +3259,7 @@ internal PSModuleInfo LoadModuleManifest(
}
}

if (newManifestInfo.Scripts == null || newManifestInfo.Scripts.LongCount() == 0)
if (newManifestInfo.Scripts == null || !newManifestInfo.Scripts.Any())
{
if (scriptsToProcess != null)
{
Expand Down