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

Use editorconfig to list types not to track #326

Open
GrahamTheCoder opened this issue Nov 8, 2021 · 2 comments
Open

Use editorconfig to list types not to track #326

GrahamTheCoder opened this issue Nov 8, 2021 · 2 comments

Comments

@GrahamTheCoder
Copy link

GrahamTheCoder commented Nov 8, 2021

I'm getting complaints of too many "false warnings" on the web+sql project I added this to. We could cover things like #123 and #245 by having a list of fully qualified type names that don't need disposal tracking in .editorconfig. Then have the defaults in an easily PR-able form.

Great project by the way!

@DaveInCaz
Copy link

Is there any Attribute which could be used to accomplish that? (Turn off a given warning for a type). That would function similarly to the .editorconfig idea but would be more visible / more self-documenting.

@GrahamTheCoder
Copy link
Author

I believe you're thinking of #126, which covers the attribute case for types defined in your own source code.

The problem I'm targeting here is to suppress warnings across the solution coming for disposable types from 3rd party libraries (including BCL) that actually don't need careful dispose tracking.

EditorConfig is already the standard for configuring analzyer warning levels and I think it could work nicely here. E.g. I'd make the analzyer warn by default, but compile error if I leak a SqlConnection, and not even show allegedly leaked DataColumns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants