-
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
CS1591 & CS1711 & CS1734 & CS1735 not respecting inheritdoc+cref #42392
Comments
@sharwell Btw... Love this feature ( |
Moving to @dotnet/roslyn-compiler. We don't have control over these warnings in the IDE layers. |
Related to #40325
|
I would not expect any of these diagnostics to be considered by inheritdoc. If you want to use one primary method to document other overloads, the documentation should be placed on the overload with the most parameters, and should only include the documentation for the actual elements that appear in that signature. |
I very much disagree Unfortunately that just isn't the ideal solution. If you do that you will end up with a spider web of |
Since you're using a documentation pattern that deviates quite substantially from the original language rules, it probably makes sense to either 1) disable the compiler diagnostics and write your own set of analyzers that cover the functionality or 2) write a diagnostic suppressor that understands the coding patterns you are using and suppresses the compiler diagnostics at the locations where you would consider them false positives. Note that this isn't a statement about "right way" or "wrong way". I'm just saying you'll be waiting a long time if you want the compiler to have built-in understanding of this scenario because we don't even have a plan for some of the other diagnostics that are higher on the list for inheritdoc scenarios and even those have been on the backlog for years. |
Topic
inheritdoc
supportscref
so that you can inherit the documentation of specific members, butCS1591
&CS1711
&CS1734
&CS1735
are triggering when you have them on members designed to be used withinheritdoc
in the same assembly.Possible Resolution
It might be a good idea to check for
inheritdoc
in the same assembly before firingCS1591
&CS1711
&CS1734
&CS1735
.Example
Example 2
Here is some of my code where I am using this pattern if it helps:
https://github.com/ZacharyPatten/Towel/blob/ab53ccda326b953432eb6a1881115a7d9d518c73/Sources/Towel/Sort.cs#L11
Alternative Possible Resolution
If there was a way to create a hidden (non-compiled, but included in XML) member in code that could be linked via
cref
so you didn't have to make a full compiled code member... that would likely be the ideal scenario, and this issue could be handled if that feature ever existed.The text was updated successfully, but these errors were encountered: