No matching documentation found for system type #2
-
In my project Smaragd I started playing around with this library and I'm thinking of integrating it there. Unfortunately I'm getting some errors regarding the usage of inheritdoc on classes which subclass system types. You can check out my current work regarding this in the feature/inheritdoc branch. This library multi-targets .NET Standard 2.0 and .NET Framework 4.5 up to 4.7.2. I'm fully aware of the issues regarding malformed .NET Standard 2.0 docs, but even when targeting .NET Framework, this construct: /// <inheritdoc />
/// <summary>
/// This <see cref="Attribute"/> is used to indicate, that the <see cref="ViewModel.IsDirty" /> property should not be set to <see langword="true"/> when the property value changes.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public sealed class IsDirtyIgnoredAttribute
: Attribute
{
// ...
} produces the warning: I'm unsure if I'm using inheritdoc wrong (including it even though documentation is present), since in this case it won't affect the output (Attribute only declares a summary tag, which is overridden by IsDirtyIgnoredAttribute). |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hey, thanks for the detailed report. You're correct, the warning is letting you know there was nothing valid to replace the I would consider that an incorrect usage, although I've just realized that if you're multi-targeting, you may have one target for which the tag is valid and one for which it isn't. More commonly, I'd expect that the user intended to combine the summary tags or something like that, and the warning is there to let them know it needs another look. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response. <remarks>
Only use this attribute on classes inheriting from MyBaseClass.
</remarks> I just want to make sure, that the docs are kept up to date with the one from the base class. |
Beta Was this translation helpful? Give feedback.
-
Yeah, that seems reasonable. And there might be cases where the I'm hesitant to remove the warning for that because it's good for catching cases where you say this: <inheritdoc />
<summary>My additional summary.</summary> When you mean to say this: <summary>
<inheritdoc path="/summary/node()" />
My additional summary.
</summary> I guess this might be a case where if you're sure you know what you're doing, it's best to set that warning to be ignored. |
Beta Was this translation helpful? Give feedback.
-
Thanks again for your response. As you pointed out, for my case it seems to be the best solution to set it to ignore that warning. |
Beta Was this translation helpful? Give feedback.
Yeah, that seems reasonable. And there might be cases where the
remarks
appear in a newer framework but not an older one in the case of multi-targeting.I'm hesitant to remove the warning for that because it's good for catching cases where you say this:
When you mean to say this:
I guess this might be a case where if you're sure you know what you're doing, it's best to set that warning to be ignored.