Fix RCS1080
This commit is contained in:
@@ -995,6 +995,9 @@ dotnet_diagnostic.RCS1072.severity = warning
|
||||
# Remove redundant constructor.
|
||||
dotnet_diagnostic.RCS1074.severity = warning
|
||||
|
||||
# Use 'Count' property instead of 'Any' method.
|
||||
dotnet_diagnostic.RCS1080.severity = warning
|
||||
|
||||
# Remove empty region.
|
||||
dotnet_diagnostic.RCS1091.severity = warning
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRA.UtilityCommands
|
||||
.ToDictionary(
|
||||
t => t.Name[..^6],
|
||||
t => t.GetFields().Where(f => f.HasAttribute<TranslationReferenceAttribute>()).Select(f => f.Name).ToArray())
|
||||
.Where(t => t.Value.Any())
|
||||
.Where(t => t.Value.Length > 0)
|
||||
.ToDictionary(t => t.Key, t => t.Value);
|
||||
|
||||
var chromeLayouts = modData.Manifest.ChromeLayout.GroupBy(c => c.Split('/')[0].Split('|')[0], c => c);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRA.Mods.Common.UpdateRules.Rules
|
||||
{
|
||||
@@ -24,7 +23,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
|
||||
|
||||
public override IEnumerable<string> AfterUpdate(ModData modData)
|
||||
{
|
||||
if (locations.Any())
|
||||
if (locations.Count > 0)
|
||||
yield return Description + "\n" +
|
||||
"ValidRelations have been removed from:\n" +
|
||||
UpdateUtils.FormatMessageList(locations);
|
||||
|
||||
Reference in New Issue
Block a user