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

Clearly define criteria for severity levels: Hidden, Info, Warning and Errors #19

Closed
giggio opened this issue Nov 16, 2014 · 6 comments
Closed
Assignees

Comments

@giggio
Copy link
Member

giggio commented Nov 16, 2014

Everything we are doing now is marked as Warnings. We should define what is a Hidden, Warning, Info or Error.

Update 3:
Included Hidden on 11/30. It is now defined as:

  1. Hidden: Only used for refactorings. See Prefer Hidden diagnostics to Refactorings #66 (and its comments) to understand why.
  2. Info: An alternative way (ex: replacing for with foreach). Clearly a matter of opinion and/or current way could be correct, or maybe the new code could be correct. We cannot determine.
  3. Warning: Code that could/should be improved. It is a code smell and most likely is wrong, but there are situations where the pattern is acceptable or desired.
  4. Error: Clearly a mistake (ex: throwing ArgumentException with an non-existent parameter). There is no situation where this code could be correct. There are no differences of opinion.

Update 2:
Issue reopened on 11/21 to allow for discussion on the Hidden level.

Update:
Defined as:

  1. Info: Just an alternative way (ex: replacing for with foreach). Clearly a matter of opinition. All options are correct.
  2. Warning: Code that could/should be improved. It is a code smell and most likely is wrong, but there are situations where the pattern is acceptable or desired.
  3. Error: Clearly a mistake (ex: throwing ArgumentException with an non-existent parameter). There is no situation where this code could be correct. There are no differences of opinion.
@giggio
Copy link
Member Author

giggio commented Nov 16, 2014

Help here, we should discuss this, @carloscds @viniciushana @ElemarJR.

@ElemarJR
Copy link
Contributor

IMHO:

  1. Warning: Code that could/should be improved;
  2. Info: Just an alternative way (ex: replacing for with foreach)
  3. Error: Clearly a mistake (ex: throwing ArgumentException with an non-existent parameter)

That is it!

@carloscds
Copy link
Contributor

For me it's ok.

@viniciushana
Copy link
Contributor

Agreed, @ElemarJR

@giggio
Copy link
Member Author

giggio commented Nov 16, 2014

Reviewing after talking with the whole group:

  1. Info: Just an alternative way (ex: replacing for with foreach). Clearly a matter of opinition. All options are correct.
  2. Warning: Code that could/should be improved. It is a code smell and most likely is wrong, but there are situations where the pattern is acceptable or desired.
  3. Error: Clearly a mistake (ex: throwing ArgumentException with an non-existent parameter). There is no situation where this code could be correct. There are no differences of opinion.

@giggio
Copy link
Member Author

giggio commented Nov 21, 2014

I am reopening the issue as we need to discuss about the Hidden severity level. Check it out: http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis/Diagnostic/DiagnosticSeverity.cs,e70281df673d47f6,references

Also, this is Microsoft's description of the severity levels:

  1. Hidden: Something that is an issue, as determined by some authority, but is not surfaced through normal means. There may be different mechanisms that act on these issues.
  2. Info: Information that does not indicate a problem (i.e. not prescriptive).
  3. Warning: Something suspicious but allowed.
  4. Error: Something not allowed by the rules of the language or other authority.

What do you think? How do we apply Hidden?

@giggio giggio changed the title Clearly define criteria for diagnostic types: Info, Warning and Errors Clearly define criteria for diagnostic types: Hidden, Info, Warning and Errors Nov 21, 2014
@giggio giggio changed the title Clearly define criteria for diagnostic types: Hidden, Info, Warning and Errors Clearly define criteria for severity levels: Hidden, Info, Warning and Errors Nov 21, 2014
@giggio giggio removed the 2 - Working label Dec 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants