diff --git a/.editorconfig b/.editorconfig index 4b35c9120b9d..359e20910c72 100644 --- a/.editorconfig +++ b/.editorconfig @@ -599,7 +599,6 @@ dotnet_diagnostic.SA1642.severity = none # ConstructorSummaryDocumentationShould dotnet_diagnostic.SA1649.severity = none # FileNameMustMatchTypeName # Requires C# 8/9 - TODO Consider enabling -dotnet_diagnostic.SA1316.severity = none # TupleElementNamesShouldUseCorrectCasing dotnet_diagnostic.SA1414.severity = none # TupleTypesInSignaturesShouldHaveElementNames #### Code Quality Rules diff --git a/OpenRA.Game/Map/MapCache.cs b/OpenRA.Game/Map/MapCache.cs index c76de9e2291b..5e854f93733c 100644 --- a/OpenRA.Game/Map/MapCache.cs +++ b/OpenRA.Game/Map/MapCache.cs @@ -195,7 +195,7 @@ public IEnumerable EnumerateMapDirPackages(MapClassification } } - public IEnumerable<(IReadWritePackage package, string map)> EnumerateMapDirPackagesAndNames(MapClassification classification = MapClassification.System) + public IEnumerable<(IReadWritePackage Package, string Map)> EnumerateMapDirPackagesAndNames(MapClassification classification = MapClassification.System) { var mapDirPackages = EnumerateMapDirPackages(classification); diff --git a/OpenRA.Mods.Common/Traits/HitShape.cs b/OpenRA.Mods.Common/Traits/HitShape.cs index 8b92953af25b..467c20ea9909 100644 --- a/OpenRA.Mods.Common/Traits/HitShape.cs +++ b/OpenRA.Mods.Common/Traits/HitShape.cs @@ -74,11 +74,11 @@ public class HitShape : ConditionalTrait, ITargetablePositions ITargetableCells targetableCells; Turreted turret; - ((CPos Cell, SubCell SubCell)[] targetableCells, - WPos? selfCenterPosition, - WRot? selfOrientation, - WRot? turretLocalOrientation, - WVec? turretOffset) cacheInput; + ((CPos Cell, SubCell SubCell)[] TargetableCells, + WPos? SelfCenterPosition, + WRot? SelfOrientation, + WRot? TurretLocalOrientation, + WVec? TurretOffset) cacheInput; WPos[] cachedTargetablePositions; diff --git a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs index 52be685e5ae8..6f34e804328b 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs @@ -56,7 +56,7 @@ void IUtilityCommand.Run(Utility utility, string[] args) ObjectCreator.MissingTypeAction = s => EmitError($"Missing Type: {s}"); FieldLoader.UnknownFieldAction = (s, f) => EmitError($"FieldLoader: Missing field `{s}` on `{f.Name}`"); - var maps = new List<(IReadWritePackage package, string map)>(); + var maps = new List<(IReadWritePackage Package, string Map)>(); if (args.Length < 2) { Console.WriteLine($"Testing mod: {modData.Manifest.Metadata.Title}"); @@ -93,7 +93,7 @@ void IUtilityCommand.Run(Utility utility, string[] args) foreach (var map in maps) { - var package = map.package.OpenPackage(map.map, modData.ModFiles); + var package = map.Package.OpenPackage(map.Map, modData.ModFiles); if (package == null) continue; diff --git a/OpenRA.Mods.Common/Widgets/ImageWidget.cs b/OpenRA.Mods.Common/Widgets/ImageWidget.cs index 9c7d1976096a..1046d3cd2551 100644 --- a/OpenRA.Mods.Common/Widgets/ImageWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ImageWidget.cs @@ -33,7 +33,7 @@ public class ImageWidget : Widget public Func GetTooltipText; readonly CachedTransform<(string, string), Sprite> getImageCache = new( - ((string collection, string image) args) => ChromeProvider.GetImage(args.collection, args.image)); + ((string Collection, string Image) args) => ChromeProvider.GetImage(args.Collection, args.Image)); public ImageWidget() { diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs index e359120558cf..36124699d558 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngamePowerCounterLogic.cs @@ -37,11 +37,11 @@ public IngamePowerCounterLogic(Widget widget, ModData modData, World world) power.GetColor = () => powerManager.ExcessPower < 0 ? Color.Red : Color.White; power.GetText = () => developerMode.UnlimitedPower ? unlimitedCapacity : powerManager.ExcessPower.ToString(); - var tooltipTextCached = new CachedTransform<(string, string), string>(((string usage, string capacity) args) => + var tooltipTextCached = new CachedTransform<(string, string), string>(((string Usage, string Capacity) args) => { return modData.Translation.GetString( PowerUsage, - Translation.Arguments("usage", args.usage, "capacity", args.capacity)); + Translation.Arguments("usage", args.Usage, "capacity", args.Capacity)); }); power.GetTooltipText = () =>