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 in GodotSharp #89317

Merged

Conversation

paulloz
Copy link
Member

@paulloz paulloz commented Mar 9, 2024

  • Fix most CS0108 in generated glue
  • Suppress CA1001 on Variant

As discussed on RC. Overall, regarding warnings: we're almost there 😅 I left the CS0108 we currently have on GltfAccessor.GetType() because it is so stinky, we deserve to endure seeing it every time.

Here's the diff of the generated classes.

--- GodotSharp/Generated.old/GodotObjects/ArrayMesh.cs	2024-03-09 16:46:29.047422800 +0100
+++ GodotSharp/Generated/GodotObjects/ArrayMesh.cs	2024-03-09 16:48:42.112835900 +0100
@@ -61,7 +61,7 @@
     /// <summary>
     /// <para>Sets the blend shape mode to one of <see cref="Godot.Mesh.BlendShapeMode"/>.</para>
     /// </summary>
-    public Mesh.BlendShapeMode BlendShapeMode
+    public new Mesh.BlendShapeMode BlendShapeMode
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/Button.cs	2024-03-09 16:46:29.125389100 +0100
+++ GodotSharp/Generated/GodotObjects/Button.cs	2024-03-09 16:48:42.191835200 +0100
@@ -182,7 +182,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/Label.cs	2024-03-09 16:46:29.577388900 +0100
+++ GodotSharp/Generated/GodotObjects/Label.cs	2024-03-09 16:48:42.634867600 +0100
@@ -256,7 +256,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/LineEdit.cs	2024-03-09 16:46:29.608389400 +0100
+++ GodotSharp/Generated/GodotObjects/LineEdit.cs	2024-03-09 16:48:42.661835600 +0100
@@ -605,7 +605,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/LinkButton.cs	2024-03-09 16:46:29.609390700 +0100
+++ GodotSharp/Generated/GodotObjects/LinkButton.cs	2024-03-09 16:48:42.663834900 +0100
@@ -82,7 +82,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/MenuBar.cs	2024-03-09 16:46:29.617415700 +0100
+++ GodotSharp/Generated/GodotObjects/MenuBar.cs		2024-03-09 16:48:42.671836500 +0100
@@ -74,7 +74,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/RichTextLabel.cs	2024-03-09 16:46:30.229494900 +0100
+++ GodotSharp/Generated/GodotObjects/RichTextLabel.cs	2024-03-09 16:48:43.247380000 +0100
@@ -413,7 +413,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {
--- GodotSharp/Generated.old/GodotObjects/TextEdit.cs	2024-03-09 16:46:30.389491200 +0100
+++ GodotSharp/Generated/GodotObjects/TextEdit.cs	2024-03-09 16:48:43.401418000 +0100
@@ -758,7 +758,7 @@
     /// <summary>
     /// <para>Base text writing direction.</para>
     /// </summary>
-    public Control.TextDirection TextDirection
+    public new Control.TextDirection TextDirection
     {
         get
         {

- Fix most CS0108 in generated glue
- Suppress CA1001 on `Variant`
@paulloz paulloz added this to the 4.3 milestone Mar 9, 2024
@paulloz paulloz requested a review from a team as a code owner March 9, 2024 16:28
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.

Looks good, thanks!

@akien-mga akien-mga merged commit 611ae19 into godotengine:master Mar 9, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

3 participants