-
Notifications
You must be signed in to change notification settings - Fork 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
Handle invalid dotnet_diagnostic entry without ID part in configurati… #45615
Conversation
@@ -488,10 +488,13 @@ private async Task<Solution> ConfigureAsync() | |||
key.EndsWith(SeveritySuffix, StringComparison.Ordinal)) | |||
{ | |||
var diagIdLength = key.Length - (DiagnosticOptionPrefix.Length + SeveritySuffix.Length); | |||
var diagId = key.Substring(DiagnosticOptionPrefix.Length, diagIdLength); | |||
if (string.Equals(diagId, _diagnostic.Id, StringComparison.OrdinalIgnoreCase)) | |||
if (diagIdLength > 0) |
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.
Only change is adding this if check.
Thanks! |
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.
Auto-approval
Does this fix the specific issue? The problem is occurring when the specified line is included in the .editorconfig file (note the leading '#'):
|
…on code fix
Fixes #45446