-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Ignore drive casing when comparing on windows platforms #73380
Conversation
{ | ||
sectionKey.Add(section); | ||
break; | ||
} |
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.
Can we add tests observing the new behavior? src/Compilers/Core/CodeAnalysisTest/Analyzers/AnalyzerConfigTests.cs
looks like a good place.
@@ -735,6 +735,16 @@ public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValu | |||
return filePath; | |||
} | |||
|
|||
public static string NormalizeDriveLetter(string filePath) |
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.
Is there a reason why we have separate normalize helpers vs. putting them all in one method? Basically I'm wondering if there is ever a case where it's okay to call only some of these normalized methods but not othhers.
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.
To my understanding the section name storage from parsing only needs to call this one, while retrieval of options for a filepath should call both. @jjonescz is that correct?
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.
It's correct that calling just the one for section names fixes the bug at hand. But I agree with Jared that we could call both even for section names, I imagine that would fix some more inconsistencies. For example, a section [*//*.cs]
doesn't match file a/b.cs
today probably. I'm not sure it should per editorconfig spec (if there is such a thing) though!
If we are not going to do that in this PR, we should at least file an issue to follow up.
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.
I'm happy for issue + follow up.
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.
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.
Overall LGTM, but tests in CI are failing.
is there a bug this is fixing? |
This was found when trying to get hot reload working for razor in vscode. Overarching item is https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1942328/ |
src/Compilers/Core/CodeAnalysisTest/Analyzers/AnalyzerConfigTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Jones <[email protected]>
…slyn into hr_razor_drivecasing
No description provided.