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 - This rule is poorly named. #3917

Open
simkin2004 opened this issue Feb 21, 2025 · 0 comments
Open

SA1625 - This rule is poorly named. #3917

simkin2004 opened this issue Feb 21, 2025 · 0 comments

Comments

@simkin2004
Copy link

The name of this rule reflects an action that was taken to get the code into a rule-breaking state, not the actual state that is the problem.

The Description of SA1625 is correct...
"The Xml documentation for a C# element contains two or more identical entries"
until the second phrase..
"indicating that the documentation has been copied and pasted."

/// <returns>A configured <see cref="WebApplicationBuilder"/>.</returns>/// <returns>A configured <see cref="WebApplicationBuilder"/>.</returns> public static WebApplicationBuilder

I can think of at least two other ways in the IDE to get into this state: bad merge & bad highlight & delete, neither of which describes the problem.

The -actual- problem is a duplicate tag for the same element, not the action I took to get into the bad state.

I would recommend changing this rule to something like:

ElementDocumentationMustNotBeDuplicated
or
ElementContainsTwoOrMoreIdenticalEntries (which would align with the documentation already provided).

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

No branches or pull requests

1 participant