diff --git a/.editorconfig b/.editorconfig index 233966a3a0..9852c0c1b0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -124,6 +124,9 @@ dotnet_style_predefined_type_for_locals_parameters_members = true # Use expression body if a local function is a single line. csharp_style_expression_bodied_local_functions = when_on_single_line +# Remove unused parameters on non public methods, ignore unused parameters on public methods. +dotnet_code_quality_unused_parameters = non_public + ## Others: # Show an IDE warning when default access modifiers are explicitly specified. diff --git a/OpenRA.Game/Graphics/Model.cs b/OpenRA.Game/Graphics/Model.cs index 73f3d31399..cd246961cb 100644 --- a/OpenRA.Game/Graphics/Model.cs +++ b/OpenRA.Game/Graphics/Model.cs @@ -84,7 +84,6 @@ namespace OpenRA.Graphics } } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "IDE0060:Remove unused parameter", Justification = "Load game API")] public PlaceholderModelSequenceLoader(ModData modData) { } public IModelCache CacheModels(IReadOnlyFileSystem fileSystem, ModData modData, IReadOnlyDictionary modelDefinitions) diff --git a/OpenRA.Mods.Cnc/Graphics/VoxelModelSequenceLoader.cs b/OpenRA.Mods.Cnc/Graphics/VoxelModelSequenceLoader.cs index 40679caa39..98969d16f5 100644 --- a/OpenRA.Mods.Cnc/Graphics/VoxelModelSequenceLoader.cs +++ b/OpenRA.Mods.Cnc/Graphics/VoxelModelSequenceLoader.cs @@ -21,7 +21,6 @@ namespace OpenRA.Mods.Cnc.Graphics { public Action OnMissingModelError { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "IDE0060:Remove unused parameter", Justification = "Load game API")] public VoxelModelSequenceLoader(ModData modData) { } public IModelCache CacheModels(IReadOnlyFileSystem fileSystem, ModData modData, IReadOnlyDictionary modelSequences) diff --git a/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs b/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs index a00fad802a..177e51fc26 100644 --- a/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs +++ b/OpenRA.Mods.Common/Graphics/DefaultSpriteSequence.cs @@ -43,7 +43,6 @@ namespace OpenRA.Mods.Common.Graphics { static readonly MiniYaml NoData = new MiniYaml(null); - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "IDE0060:Remove unused parameter", Justification = "Load game API")] public DefaultSpriteSequenceLoader(ModData modData) { } public virtual ISpriteSequence CreateSequence(ModData modData, string tileset, SpriteCache cache, string image, string sequence, MiniYaml data, MiniYaml defaults) diff --git a/OpenRA.Mods.Common/Terrain/DefaultTerrain.cs b/OpenRA.Mods.Common/Terrain/DefaultTerrain.cs index 6bd9349cae..c7aa1ff0f6 100644 --- a/OpenRA.Mods.Common/Terrain/DefaultTerrain.cs +++ b/OpenRA.Mods.Common/Terrain/DefaultTerrain.cs @@ -20,7 +20,6 @@ namespace OpenRA.Mods.Common.Terrain { public class DefaultTerrainLoader : ITerrainLoader { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "IDE0060:Remove unused parameter", Justification = "Load game API")] public DefaultTerrainLoader(ModData modData) { } public ITerrainInfo ParseTerrain(IReadOnlyFileSystem fileSystem, string path)