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

DOC210/DOC211: Highlight invalid usages of <returns> #74

Open
drewnoakes opened this issue Nov 19, 2018 · 2 comments
Open

DOC210/DOC211: Highlight invalid usages of <returns> #74

drewnoakes opened this issue Nov 19, 2018 · 2 comments
Labels
analyzer help wanted Extra attention is needed

Comments

@drewnoakes
Copy link

drewnoakes commented Nov 19, 2018

I don't think there's a valid reason to have a <returns> element on a void typed member:

/// <returns>Nothing at all!</returns>
public void Foo();

Nor on a type:

/// <returns>Nothing at all!</returns>
public class Foo { }

Nor on a field:

/// <returns>Nothing at all!</returns>
private int _foo;
@sharwell
Copy link
Member

sharwell commented Nov 19, 2018

There are two issues here, likely with distinct diagnostic IDs:

  1. DOC210: Use <value> instead of <returns> (applies to fields and properties)
  2. DOC211: Element does not have a value (everything else)

@drewnoakes
Copy link
Author

Does <returns> make sense on a non-void-returning delegate declaration?

@sharwell sharwell changed the title Highlight invalid usages of <returns> DOC210/DOC211: Highlight invalid usages of <returns> Nov 20, 2018
@sharwell sharwell added enhancement New feature or request help wanted Extra attention is needed analyzer and removed enhancement New feature or request labels Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants