Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Fix warnings caught by new problem-matchers #99902

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Dec 1, 2024

The above PR integrated specialized problem matchers for our repo, serving as enhanced versions of the ones we were already using. One consequence of this addition was the .NET solutions started to produce warnings as well, so those specific matchers needed to be excluded so they wouldn't create noise on all Actions post-merge. This PR fixes the handful of remaining warnings throughout the C# codebase, allowing that exclusion to be removed so future C# errors/warnings will be caught by GitHub Actions

Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. I checked the generated bindings and these were the only changes:

diff --git a/GodotSharp/GodotObjects/EngineDebugger.cs b/GodotSharp/GodotObjects/EngineDebugger.cs
index 8fe54b1..b61f089 100644
--- a/GodotSharp/GodotObjects/EngineDebugger.cs
+++ b/GodotSharp/GodotObjects/EngineDebugger.cs
@@ -101,7 +101,7 @@ public static partial class EngineDebugger
     /// <summary>
     /// <para>Registers a message capture with given <paramref name="name"/>. If <paramref name="name"/> is "my_message" then messages starting with "my_message:" will be called with the given callable.</para>
     /// <para>The callable must accept a message string and a data array as argument. The callable should return <see langword="true"/> if the message is recognized.</para>
-    /// <para><b>Note:</b> The callable will receive the message with the prefix stripped, unlike <see cref="Godot.EditorDebuggerPlugin._Capture(string, Godot.Collections.Array, int)"/>. See the <c>EditorDebuggerPlugin</c> description for an example.</para>
+    /// <para><b>Note:</b> The callable will receive the message with the prefix stripped, unlike <c>EditorDebuggerPlugin._Capture</c>. See the <c>EditorDebuggerPlugin</c> description for an example.</para>
     /// </summary>
     public static void RegisterMessageCapture(StringName name, Callable callable)
     {
diff --git a/GodotSharp/GodotObjects/EngineDebuggerInstance.cs b/GodotSharp/GodotObjects/EngineDebuggerInstance.cs
index e52d2f6..b16c9c4 100644
--- a/GodotSharp/GodotObjects/EngineDebuggerInstance.cs
+++ b/GodotSharp/GodotObjects/EngineDebuggerInstance.cs
@@ -118,7 +118,7 @@ public partial class EngineDebuggerInstance : GodotObject
     /// <summary>
     /// <para>Registers a message capture with given <paramref name="name"/>. If <paramref name="name"/> is "my_message" then messages starting with "my_message:" will be called with the given callable.</para>
     /// <para>The callable must accept a message string and a data array as argument. The callable should return <see langword="true"/> if the message is recognized.</para>
-    /// <para><b>Note:</b> The callable will receive the message with the prefix stripped, unlike <see cref="Godot.EditorDebuggerPlugin._Capture(string, Godot.Collections.Array, int)"/>. See the <c>EditorDebuggerPlugin</c> description for an example.</para>
+    /// <para><b>Note:</b> The callable will receive the message with the prefix stripped, unlike <c>EditorDebuggerPlugin._Capture</c>. See the <c>EditorDebuggerPlugin</c> description for an example.</para>
     /// </summary>
     public void RegisterMessageCapture(StringName name, Callable callable)
     {
diff --git a/GodotSharp/GodotObjects/GltfAccessor.cs b/GodotSharp/GodotObjects/GltfAccessor.cs
index 15ab651..27b543f 100644
--- a/GodotSharp/GodotObjects/GltfAccessor.cs
+++ b/GodotSharp/GodotObjects/GltfAccessor.cs
@@ -461,7 +461,7 @@ public partial class GltfAccessor : Resource
     private static readonly IntPtr MethodBind12 = ClassDB_get_method_with_compatibility(NativeName, MethodName.GetType, 2455072627ul);
 
     [EditorBrowsable(EditorBrowsableState.Never)]
-    public int GetType()
+    public new int GetType()
     {
         return NativeCalls.godot_icall_0_37(MethodBind12, GodotObject.GetPtr(this));
     }
@@ -793,7 +793,7 @@ public partial class GltfAccessor : Resource
         /// <summary>
         /// Cached name for the 'get_type' method.
         /// </summary>
-        public static readonly StringName GetType = "get_type";
+        public static new readonly StringName GetType = "get_type";
         /// <summary>
         /// Cached name for the 'set_type' method.
         /// </summary>
diff --git a/GodotSharp/GodotObjects/VisualShaderNodeReroute.cs b/GodotSharp/GodotObjects/VisualShaderNodeReroute.cs
index a1c19f1..537edda 100644
--- a/GodotSharp/GodotObjects/VisualShaderNodeReroute.cs
+++ b/GodotSharp/GodotObjects/VisualShaderNodeReroute.cs
@@ -12,7 +12,7 @@ using Godot.NativeInterop;
 public partial class VisualShaderNodeReroute : VisualShaderNode
 {
     [EditorBrowsable(EditorBrowsableState.Never)]
-    public VisualShaderNode.PortType PortType
+    public new VisualShaderNode.PortType PortType
     {
         get
         {

• Restore MSVC problem matcher for Linux builds
@Repiteo Repiteo merged commit 1f0eeea into godotengine:master Dec 10, 2024
19 checks passed
@Repiteo Repiteo deleted the dotnet/ci-warnings branch December 10, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants