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

SA1642 does not handle use of the <para> tag #3575

Closed
tznind opened this issue Nov 8, 2022 · 1 comment · Fixed by #3861
Closed

SA1642 does not handle use of the <para> tag #3575

tznind opened this issue Nov 8, 2022 · 1 comment · Fixed by #3861

Comments

@tznind
Copy link

tznind commented Nov 8, 2022

I am using StyleCop.Analyzers.Unstable Version 1.2.0.435 and have noticed this issue.

When a <summary> tag on a constructor starts with <para> then the standard text you still get SA1642 reported.

/// <summary>
/// Does a thing.
/// </summary>
public class B
{
    /// <summary>
    /// <para>
    /// Initializes a new instance of the <see cref="B"/> class.
    /// </para>
    /// <para>
    /// Some more info about B.
    /// </para>
    /// </summary>
    public B()
    {
    }
}

The <para> tag be valid in this case:

The <para> tag is for use inside a tag, such as <summary>, <remarks>, or <returns>, and lets you add structure to the text. The <para> tag creates a double spaced paragraph [...]

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags#para

Update:
This was reported in #1934 in 2019 and reported as closed... although actually that looks like its about get and set.

@sharwell
Copy link
Member

Seems the solution would work something like #2864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment