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

Right clicking to supress on a warning from a generated file does not suppress it. #54120

Open
chsienki opened this issue Jun 15, 2021 · 4 comments

Comments

@chsienki
Copy link
Contributor

A warning introduced by a source generated file will show in the error list, and the user can right click to choose the suppression level.

image

However, when applying the suppression it is added to the .editorconfig file, which will not have any affect on the generated code. Thus it continues to appear.

The correct solution (currently) would be to add the supression in a .globalconfig so that it also applies to generated code. This has the downside however of applying to all source files in the solution, which is obviously not an ideal solution either.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jun 15, 2021
@chsienki
Copy link
Contributor Author

@mavasani @jmarolf

@chsienki
Copy link
Contributor Author

We're back in the somewhat crummy situation where a .globalconfig is too strong, and and .editorconfig doesn't apply to generated code.

I think we need to tweak the design (again 😕) to either somehow allow .editorconfig to apply to generated code, or allow .globalconfig to support wildcards. I think i'd prefer the first option, as the more we can keep things out of the global config the better, but we'd need to design something for it.

@jmarolf
Copy link
Contributor

jmarolf commented Jun 15, 2021

These warnings should not be reported in the first place. are these files not marking themselves as generated code?

@chsienki
Copy link
Contributor Author

@jmarolf Filed alongside the following: #54119

@jinujoseph jinujoseph added Concept-Continuous Improvement Feature - Source Generators Source Generators and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 16, 2021
@jinujoseph jinujoseph added this to the 17.0 milestone Jun 16, 2021
@jmarolf jmarolf modified the milestones: 17.0, 17.1 Sep 8, 2021
@jmarolf jmarolf modified the milestones: 17.1, 17.2 Jan 11, 2022
@jmarolf jmarolf modified the milestones: 17.2, Backlog Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants