-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
CS1573, CS1712 warnings shouldn't appear when inheriting docs #40325
Comments
@sharwell who added the inheritdoc feature recently. |
The compiler doesn't actually understand inheritdoc, which is an IDE feature. I would recommend inheriting the other way around. Also, consider disabling CS1573 and using a more configurable analyzer for documentation comments. |
Ya, the fact that it's not in the compiler itself is a bit unfortunate, since it means when I use I can't inherit the other way around because the method with more parameters is conditionally defined while the method with fewer parameters is always defined. I may disable CS1573, but is there another analyzer that will still help me make sure things are adequately documented? |
It needs a cross team work between compiler and IDE |
Does this means that |
Yes, @andre-ss6. The compiler does not generate xml with the docs actually copied -- it merely adds the reference. It's the language service that has to follow the refs to find the actual doc to present to the user in the editor. |
I have noticed the same issue with CS1573 being reported when there is a mix of |
Moving this back to compilers. Their decision on whether CS1573 appears in this case is final in the sense that we can't override it from the IDE side. |
Related to #42392
Don't forget
|
And This is frustrating because I use inheritdoc+cref to reduce noise in my code, but because they don't work properly, I add lots of Without respecting the |
The new
<inheritdoc cref />
support is awesome. I use it now to avoid a lot of redundancy in documentation across overloads. But I found that if I document one method then inherit that doc on another method that adds just one parameter, I get a CS1573 warning when I add documentation for just the one new parameter:Repro on sharplab. Although sharplab doesn't show the intellisense that VS does, so here is the screenshot:
The irony from the image above is that the popup when hovering over
arg1
both claims that there is no documentation for that parameter while also presenting the documentation (that was inherited from the other overload).The text was updated successfully, but these errors were encountered: