-
Notifications
You must be signed in to change notification settings - Fork 10
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
Define meaning of errors, warnings and severity levels #20
Comments
A reasonable parable for this (complete with numeric representations) would be syslog (https://en.wikipedia.org/wiki/Syslog): 0 -> emergency (basically syntax error) |
|
To implement sensible rules for severity levels, we need to figure out use cases first, that would require a certain minimum severity threshold. We found the following interesting thresholds (no numbers yet):
Suggestion to start with
That means, the default threshold of 5 checks all the rules with severity 5 or greater. This will exclude strict rules and experimental rules. I've left gaps for possible further distinctions, like levels of strictness for extensions, or additional use cases How to determine severity of a rule:Start from highest to lowest, asking:
|
Looks great to me. The one I can't judge yet would be the Project level but I am guessing over time this will become clearer. One additional idea that I like is to tighten the rules over time. So far example a rule would initially start its life as experimental and then gets upgraded to the next levels as we confirm they are useful. |
For experimental rules it's obvious: either they get "upgraded" or dropped at some point. But raising the level step by step sounds interesting too, I like that idea! |
phpcs distinguishs between errors and warnings and additionally provides severity levels from 1-9 which are independent from the error/warning levels.
We should pick the severity levels for our own sniffs carefully and implement a guideline to help us doing so.
Some initial suggestions:
References:
The text was updated successfully, but these errors were encountered: