Add fixed issues as warnings to .editorconfig
This commit is contained in:
committed by
atlimit8
parent
c224bfdc0d
commit
a1811b4b04
@@ -132,6 +132,9 @@ dotnet_diagnostic.IDE0011.severity = silent
|
|||||||
# Object initialization can be simplified / Use object initializer.
|
# Object initialization can be simplified / Use object initializer.
|
||||||
dotnet_diagnostic.IDE0017.severity = warning
|
dotnet_diagnostic.IDE0017.severity = warning
|
||||||
|
|
||||||
|
# Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0028.severity = warning
|
||||||
|
|
||||||
# Modifiers are not ordered.
|
# Modifiers are not ordered.
|
||||||
dotnet_diagnostic.IDE0036.severity = warning
|
dotnet_diagnostic.IDE0036.severity = warning
|
||||||
|
|
||||||
@@ -157,3 +160,36 @@ dotnet_diagnostic.CA1847.severity = warning
|
|||||||
[*.yaml]
|
[*.yaml]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
# Use 'Count' property instead of 'Any' method.
|
||||||
|
dotnet_diagnostic.RCS1080.severity = warning
|
||||||
|
|
||||||
|
# Use the "Length" property instead of Enumerable.Count().
|
||||||
|
dotnet_diagnostic.CA1829.severity = warning
|
||||||
|
|
||||||
|
# Use read-only auto-implemented property.
|
||||||
|
dotnet_diagnostic.RCS1170.severity = warning
|
||||||
|
|
||||||
|
# Unnecessary interpolated string.
|
||||||
|
dotnet_diagnostic.RCS1214.severity = warning
|
||||||
|
|
||||||
|
# Unnecessary usage of verbatim string literal.
|
||||||
|
dotnet_diagnostic.RCS1192.severity = warning
|
||||||
|
|
||||||
|
# Use pattern matching instead of combination of 'as' operator and null check.
|
||||||
|
dotnet_diagnostic.RCS1221.severity = warning
|
||||||
|
|
||||||
|
# Expression is always equal to 'true'.
|
||||||
|
dotnet_diagnostic.RCS1215.severity = warning
|
||||||
|
|
||||||
|
# Use StringComparison when comparing strings.
|
||||||
|
dotnet_diagnostic.RCS1155.severity = warning
|
||||||
|
|
||||||
|
# Abstract type should not have public constructors.
|
||||||
|
dotnet_diagnostic.RCS1160.severity = warning
|
||||||
|
|
||||||
|
# Optimize 'Dictionary<TKey, TValue>.ContainsKey' call.
|
||||||
|
dotnet_diagnostic.RCS1235.severity = warning
|
||||||
|
|
||||||
|
# Call extension method as instance method.
|
||||||
|
dotnet_diagnostic.RCS1196.severity = warning
|
||||||
|
|||||||
@@ -145,8 +145,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
// A different minelayer might have started laying the field without this minelayer knowing the start
|
// A different minelayer might have started laying the field without this minelayer knowing the start
|
||||||
minefieldStart = order.ExtraLocation;
|
minefieldStart = order.ExtraLocation;
|
||||||
|
|
||||||
#pragma warning disable IDE0019 // Use pattern matching
|
|
||||||
|
|
||||||
var movement = self.Trait<IPositionable>();
|
var movement = self.Trait<IPositionable>();
|
||||||
var mobile = movement as Mobile;
|
var mobile = movement as Mobile;
|
||||||
|
|
||||||
@@ -155,8 +153,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
&& movement.CanEnterCell(c, null, BlockedByActor.Immovable) && (mobile != null && mobile.CanStayInCell(c)))
|
&& movement.CanEnterCell(c, null, BlockedByActor.Immovable) && (mobile != null && mobile.CanStayInCell(c)))
|
||||||
.OrderBy(c => (c - minefieldStart).LengthSquared).ToList();
|
.OrderBy(c => (c - minefieldStart).LengthSquared).ToList();
|
||||||
|
|
||||||
#pragma warning restore IDE0019 // Use pattern matching
|
|
||||||
|
|
||||||
self.QueueActivity(order.Queued, new LayMines(self, minefield));
|
self.QueueActivity(order.Queued, new LayMines(self, minefield));
|
||||||
self.ShowTargetLines();
|
self.ShowTargetLines();
|
||||||
}
|
}
|
||||||
@@ -309,8 +305,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
var minefield = GetMinefieldCells(minefieldStart, lastMousePos,
|
var minefield = GetMinefieldCells(minefieldStart, lastMousePos,
|
||||||
minelayers.Max(m => m.Info.TraitInfo<MinelayerInfo>().MinefieldDepth));
|
minelayers.Max(m => m.Info.TraitInfo<MinelayerInfo>().MinefieldDepth));
|
||||||
|
|
||||||
#pragma warning disable IDE0019 // Use pattern matching
|
|
||||||
|
|
||||||
var movement = minelayer.Trait<IPositionable>();
|
var movement = minelayer.Trait<IPositionable>();
|
||||||
var mobile = movement as Mobile;
|
var mobile = movement as Mobile;
|
||||||
var pal = wr.Palette(TileSet.TerrainPaletteInternalName);
|
var pal = wr.Palette(TileSet.TerrainPaletteInternalName);
|
||||||
@@ -341,8 +335,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
yield return new SpriteRenderable(tile, world.Map.CenterOfCell(c), WVec.Zero, -511, pal, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
yield return new SpriteRenderable(tile, world.Map.CenterOfCell(c), WVec.Zero, -511, pal, 1f, alpha, float3.Ones, TintModifiers.IgnoreWorldTint, true);
|
||||||
|
|
||||||
#pragma warning restore IDE0019 // Use pattern matching
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user