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

SA1625 (copied and pasted) and inheritdoc #3108

Open
brinko99 opened this issue Jan 22, 2020 · 3 comments
Open

SA1625 (copied and pasted) and inheritdoc #3108

brinko99 opened this issue Jan 22, 2020 · 3 comments
Labels

Comments

@brinko99
Copy link

Regarding: 1.2.0-beta.113 (and earlier)

The below shows a violation of SA1625 on the second inheritdoc, due to inheritdoc also being used within the values param.

I believe this is a valid use case and should be allowed by SA1625.

Note, I tried removing the values param all together with the hope that the higher level inheritdoc would cover the missing param. But this produces a CS1573 warning (Parameter 'values' has no matching param tag in the XML comment for 'values' (but other parameters do)).

Might there be other ways to accomplish this?

Thanks.

/// <summary>
/// My summary text.
/// </summary>
/// <param name="values"><inheritdoc /></param>
/// <param name="targetType">The parameter is not used.</param>
/// <param name="parameter">The parameter is not used.</param>
/// <param name="culture">The parameter is not used.</param>>
/// <inheritdoc />
@sharwell
Copy link
Member

But this produces a CS1573 warning

I recommend disabling the following three documentation warnings:

<!--
Make sure any documentation comments which are included in code get checked for syntax during the build, but do
not report warnings for missing comments.
CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do)
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
CS1712: Type parameter 'type_parameter' has no matching typeparam tag in the XML comment on 'type_or_member' (but other type parameters do)
-->
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<NoWarn>$(NoWarn),1573,1591,1712</NoWarn>

@sharwell sharwell added the bug label Jan 23, 2020
@sharwell
Copy link
Member

sharwell commented Jan 23, 2020

I marked this as a bug because the documentation content rules should evaluate <inheritdoc/> rather than treating it as a literal. It will be nearly impossible to implement the rules today because command line builds currently fail to provide a documentation provider for referenced assemblies (dotnet/roslyn#23673).

@brinko99
Copy link
Author

@sharwell, thanks for guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants