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

CS1591: Redundant comments are required in all partial method definitions #54103

Closed
mano-cz opened this issue Jun 15, 2021 · 0 comments · Fixed by #56419
Closed

CS1591: Redundant comments are required in all partial method definitions #54103

mano-cz opened this issue Jun 15, 2021 · 0 comments · Fixed by #56419
Assignees
Milestone

Comments

@mano-cz
Copy link

mano-cz commented Jun 15, 2021

Analyzer

Diagnostic ID: CS1591: Missing XML comment for publicly visible type or member

Analyzer source

Version: SDK 5.0.100

Describe the bug

The public partial method in the public partial class requires XML comments in each partial method definition. The class itself requires the documentation only in one place.

Steps To Reproduce

Prerequisite: XML comments are enabled.

  1. Define the public partial method without implementation inside a public partial class.
  2. In another file: Define the same public partial class with the same public partial method, but now with implementation.
  3. Add XML comment to only one file where the partial method is defined.
  4. CS1591 will pop up on the other file, it does not matter in which file the XML comment was created.

Expected behavior

It would be enough to create only one XML comment on the partial method, the same as with the partial class.

Actual behavior

In order to dismiss CS1591, the partial method has to be documented everywhere or use suppresion.

Additional context

Example:

Without CS1591
image
Second file with CS1591 on partial method
image

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

Successfully merging a pull request may close this issue.

3 participants