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

Fix S2094 FP: Documentation using the DefaultDocumentation package #9062

Closed
denis-troller opened this issue Apr 10, 2024 · 3 comments · Fixed by #9083
Closed

Fix S2094 FP: Documentation using the DefaultDocumentation package #9062

denis-troller opened this issue Apr 10, 2024 · 3 comments · Fixed by #9083
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Positive Rule IS triggered when it shouldn't be.
Milestone

Comments

@denis-troller
Copy link

Description

Rule S2094 should not raise when used to document assembly and namespaces with package DefaultDocumentation

Repro steps

According to the packages documentation, you can document your assembly like this:

namespace YourAssemblyName
{
    /// <summary>
    /// your assembly documentation, used on the assembly page
    /// </summary>
    internal static class AssemblyDoc { } // internal so it is not visible outside the assembly
}

And you can document your namespace like this:

namespace YourNamespace
{
    /// <summary>
    /// your namespace documentation
    /// </summary>
    internal static class NamespaceDoc { } // internal so it is not visible outside the assembly
}

Expected behavior

I expect rule S2094 not to raise in such cases..

Actual behavior

Rule S2094 raises an issue.

@denis-troller denis-troller changed the title Fix S2094 FP/FN: Valid reasons for an empty class Fix S2094 FP: Documentation using the DefaultDocumentation package Apr 10, 2024
@denis-troller denis-troller added Type: False Positive Rule IS triggered when it shouldn't be. Area: C# C# rules related issues. Sprint: Hardening Fix FPs/FNs/improvements labels Apr 10, 2024
@Tim-Pohlmann Tim-Pohlmann added the Area: VB.NET VB.NET rules related issues. label Apr 11, 2024
@Tim-Pohlmann
Copy link
Contributor

@denis-troller wouldn't it be easier to just ignore classes called AssemblyDoc and NamespaceDoc?

@denis-troller
Copy link
Author

Yes, I thought that was the point of this ticket :)

@Tim-Pohlmann
Copy link
Contributor

NVM I misread the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: Hardening Fix FPs/FNs/improvements Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants