-
-
Notifications
You must be signed in to change notification settings - Fork 749
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
Suppress warning CS1591: Missing XML comment in autogenerated code #5987
Comments
Thank you for this feedback ... I have added it to the 13.1 backlog. |
For what it's worth, you can suppress these warnings using an .editorconfig file, for example: [**/Generated/**]
dotnet_diagnostic.CS1591.severity = none If you're using Visual Studio, you might be able to disable all warnings instead of specific ones: [**/Generated/**]
generated_code = true but I haven't gotten that to work with |
Hi @SeijiSuenaga, Unfortunately the suppression in I also ran into this issue with Godot and their source generators. It currently requires the generated code to add a `#pragma' directive in order to suppress analysis issues. |
@RobTF that's odd because the first example I posted does work for me with .NET SDK 6.0.408 and VS Code with Roslyn analyzers enabled. 🤔 I get no warnings with that .editorconfig, and lots of warnings without it. |
Interesting... ill give it a try again tomorrow. If i get no joy ill push to a public repo so perhaps we could compare? |
Is a fix for this likely to make it into a release in the near future? This is making me reconsider whether to use the source generators in our project -- they are great, but it looks like I would have to suppress the doc rules project-wide, because I couldn't get any editorconfig rules to be respected and we have our CI build our code with warnings set to errors. |
Turns out you can suppress messages in just the generated code using |
Product
Hot Chocolate
Is your feature request related to a problem?
HotChocolate.Types.Analyzers generate code (Data Loaders, Type Auto Registration, etc) that can be publicly visible. This autogenerated code produces warnings type CS1591: Missing XML comment and it can not be suppressed.
The solution you'd like
I would like the autogenerated code to have directives that suppress the specified warnings.
The text was updated successfully, but these errors were encountered: