dotnet/roslyn

<inheritdoc cref> has bad default for `path` attribute, leading to senseless inherited doc

Open

#45,994 opened on Jul 15, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-IDEConcept-Continuous ImprovementIDE-IntelliSensehelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

Version Used: 16.8 (30313.166.master)

Steps to Reproduce:

public class C
{
    /// <param name="a"><inheritdoc cref="M(int,int)" path="/param[@name='a']"/></param>
    public void M(int a)
    {
        if (a > 0)
        {
        }
    }

    /// <summary>summary</summary>
    /// <param name="a">A description</param>
    /// <param name="b">B description</param>
    public void M(int a, int b)
    {
        if (a > 0 || b > 0)
        {
        }
    }
}

Expected Behavior:

I expect the default path to provide the same meaning as the explicitly specified path, as shown here:

image

Actual Behavior:

Instead, I see a concatenation of all param docs together, with not so much as a delimiter:

image

Contributor guide