1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

C#: Fix warnings caught by new problem-matchers

• Restore MSVC problem matcher for Linux builds
This commit is contained in:
Thaddeus Crews
2024-12-01 12:01:15 -06:00
parent a372214a4a
commit 57d08dbec3
7 changed files with 132 additions and 67 deletions

View File

@@ -1046,6 +1046,8 @@ namespace Godot.Collections
[DebuggerTypeProxy(typeof(ArrayDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
[SuppressMessage("ReSharper", "RedundantExtendsListEntry")]
[SuppressMessage("Design", "CA1001", MessageId = "Types that own disposable fields should be disposable",
Justification = "Known issue. Requires explicit refcount management to not dispose untyped collections.")]
[SuppressMessage("Naming", "CA1710", MessageId = "Identifiers should have correct suffix")]
public sealed class Array<[MustBeVariant] T> :
IList<T>,

View File

@@ -485,6 +485,8 @@ namespace Godot.Collections
/// <typeparam name="TValue">The type of the dictionary's values.</typeparam>
[DebuggerTypeProxy(typeof(DictionaryDebugView<,>))]
[DebuggerDisplay("Count = {Count}")]
[SuppressMessage("Design", "CA1001", MessageId = "Types that own disposable fields should be disposable",
Justification = "Known issue. Requires explicit refcount management to not dispose untyped collections.")]
public class Dictionary<[MustBeVariant] TKey, [MustBeVariant] TValue> :
IDictionary<TKey, TValue>,
IReadOnlyDictionary<TKey, TValue>,

View File

@@ -109,7 +109,7 @@ internal class ReflectionUtils
// Append brackets.
AppendArrayBrackets(sb, type);
static void AppendArrayBrackets(StringBuilder sb, Type type)
static void AppendArrayBrackets(StringBuilder sb, Type? type)
{
while (type != null && type.IsArray)
{