-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update the severities value of BuildCheck results #10330
Update the severities value of BuildCheck results #10330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'd like to see somewhere in the documentation stating that to enable a rule or analyzer, the severity needs to be set. Just to make things clear for users.
@maridematte is that really the case? If no severity is set, then the 'default' severity for each rule should be used, which is variable and will lead to at least some rules being on by default without any user settings. This is desired - generally when we make rules we want them to be on, and users have to do something extra to turn them off. |
Thank you @maridematte, like @baronfel mentioned, it is not the case. and only enablment that should be happening is /analyze. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick handling of this! It looks good - I'd only want this to be aligned with Roslyn (skipping the Silent
severity)
src/Build/BuildCheck/Infrastructure/BuildAnalyzerConfigurationInternal.cs
Outdated
Show resolved
Hide resolved
@JanKrivanek Thank you for the review. |
src/Build/BuildCheck/Infrastructure/BuildAnalyzerConfigurationInternal.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Fixes #10097
Context
Current severity model supports only
Info
,Warning
,Error
levels of the configurable values, and are not aligned with the documentation provided in the BuildCheck.BuildCheck documentation currently provides the possibility to have the severity equal to
None
,Default
,Suggestion
Changes Made
None
- will result the IsEnabled to be set to falseDefault
- if set to the rule, the default value of the rule will be used.Info
renamed to theSuggestion
IsEnabled
.Testing
Manual testing with additional automated test to cover the scenario of enablment of the rule