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

False positive Exception is not thrown #12

Open
lKoTl opened this issue Nov 25, 2022 · 4 comments
Open

False positive Exception is not thrown #12

lKoTl opened this issue Nov 25, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@lKoTl
Copy link

lKoTl commented Nov 25, 2022

When adding exception documentation, it says that it's not thrown, but the Extension suggest to add them.

image

image

Would be great to fix it.
It's not only with .NET libraries, I have similar with own NuGet packages where a Helper throws an exception but the Extension behaves as described above.

@lKoTl
Copy link
Author

lKoTl commented Nov 25, 2022

As this is happening with .NET6.0, just to mention.

@hhu-mahmoud
Copy link
Owner

@lKoTl

Can you please provide me with an example code?

@thomasmolitor
Copy link

I think I only have this issue when using expression-bodied members. Hope this helps.

@lKoTl
Copy link
Author

lKoTl commented Aug 3, 2023

Hi @hhu-mahmoud ,

I'll try to do the sample code.

To @thomasmolitor comment, I don't have the issue with the expression-bodied members.

Did some deeper investigation, it only relates to properties, in my current case to get accessor.

image

When the Expression-body is used as get accessor, it only raises that the exception is not thrown.
However if you do a full get accessor declaration, it seems that it doesn't pick up the documentation then either.
image

As with expression-body getter, at least it sees that the exception documentation was added.

@hhu-mahmoud hhu-mahmoud added the enhancement New feature or request label Sep 22, 2023
@hhu-mahmoud hhu-mahmoud self-assigned this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants