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#: Move bindings_generator warnings to .editorconfig #81703

Merged

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Sep 15, 2023

Migrates the warning handlers for CS1591 and CS1573 from the binding generator's stringbuilder to the GodotSharp .editorconfig file. The handlers in the binding generator predate the creation of this file, and the only section that exists is for the "Generated" folders so this makes for a seamless addition

Beyond that, the only change made is appending generated_code = true to the generator config, which makes the folder & its contents explicitly recognized as generated for any IDE/tool that supports it Reverted: unsure of the full implications on analyzers if this changed

@Repiteo Repiteo requested a review from a team as a code owner September 15, 2023 17:58
@raulsntos raulsntos added this to the 4.x milestone Sep 16, 2023
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.

Moving the suppressions to .editorconfig makes sense to me. I'm a bit concerned about generated_code though.

modules/mono/glue/GodotSharp/.editorconfig Outdated Show resolved Hide resolved
@Repiteo Repiteo force-pushed the c#-binding-warnings-to-editorconfig branch from 89e6fb6 to e43b63a Compare September 16, 2023 16:56
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.

I think this is fine, we should try to document the generated code properly so we can remove these suppressions in the future.

Note that this will also suppress the warnings for the GD_extensions.cs and NativeCalls.cs files that previously weren't suppressing them.

@akien-mga akien-mga modified the milestones: 4.x, 4.2 Sep 18, 2023
@akien-mga akien-mga merged commit 793c382 into godotengine:master Sep 18, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov changed the title C# - bindings_generator warnings to .editorconfig C#: Move bindings_generator warnings to .editorconfig Sep 18, 2023
@Repiteo Repiteo deleted the c#-binding-warnings-to-editorconfig branch September 19, 2023 13:54
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