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

IDE0060 shouldn't warn for throw-only methods #65275

Closed
stephentoub opened this issue Nov 8, 2022 · 3 comments · Fixed by #66535
Closed

IDE0060 shouldn't warn for throw-only methods #65275

stephentoub opened this issue Nov 8, 2022 · 3 comments · Fixed by #66535
Assignees
Labels
Area-IDE Feature - IDE0060 Remove unused parameter

Comments

@stephentoub
Copy link
Member

IDE0060 currently fires for methods like:

private static void Blah(int something) => throw new PlatformNotSupportedException();

We have many such constructs, due to multitargeting and having the same method in multiple files, in some fully implemented and in others just throwing an exception. We're having to suppress IDE0060 in many places to account for this. It'd be really helpful if either always or configurably IDE0060 could support not warning in cases where the method implementation is simply to always throw.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 8, 2022
@CyrusNajmabadi CyrusNajmabadi added the Feature - IDE0060 Remove unused parameter label Nov 8, 2022
@sharwell
Copy link
Member

sharwell commented Jan 6, 2023

@CyrusNajmabadi please update the Feature - IDE0060 label to include the diagnostic title.

@CyrusNajmabadi
Copy link
Member

Done.

@CyrusNajmabadi
Copy link
Member

I'll try to slowly update these all accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature - IDE0060 Remove unused parameter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants