Proposal: Catch or document Exception
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 294
- Avg merge
- 2h 30m
- Merged PRs (30d)
- 4
Description
Hi,
I'd like to propose an analyzer and codefix similar to the [Exceptional](https://github.com/CSharpAnalyzers/ExceptionalReSharper) plugin for ReSharper.
What it does it check your methods if they throw exceptions which aren't documented in the documentation of the method. You already have an analyzer and codefix for this.
But what it also does it analyze the documentation of methods you're calling and suggest you to either catch the exception or also add it to your method doc.
What would be needed is a way to configure exceptions which are ignored (e.g. NUnit, Xunit, Moq, ...)
You can see it as an extension to the current analyzer + codefix which acts like a sane way of Java's checked exceptions (since you can just disable the analyzer).
If you like the idea and can give me some hints on how to implement it I might be able to do so and send a PR. All I need is a way to find method calls and check their documentation.
Contributor guide
Assessment
This issue has not been assessed yet.