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

Ignore drive casing when comparing on windows platforms #73380

Merged
merged 19 commits into from May 22, 2024

Conversation

ryzngard
Copy link
Contributor

@ryzngard ryzngard commented May 8, 2024

No description provided.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 8, 2024
@ryzngard ryzngard marked this pull request as ready for review May 9, 2024 21:09
@ryzngard ryzngard requested a review from a team as a code owner May 9, 2024 21:09
@ryzngard ryzngard requested a review from chsienki May 10, 2024 00:04
{
sectionKey.Add(section);
break;
}
Copy link
Contributor

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)
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor

@jjonescz jjonescz May 21, 2024

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@jjonescz jjonescz left a 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.

@CyrusNajmabadi
Copy link
Member

is there a bug this is fixing?

@ryzngard
Copy link
Contributor Author

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/

@ryzngard ryzngard requested a review from jjonescz May 21, 2024 23:53
@ryzngard ryzngard enabled auto-merge (squash) May 22, 2024 20:41
@ryzngard ryzngard merged commit 2cd8f0b into dotnet:main May 22, 2024
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone May 22, 2024
@ryzngard ryzngard deleted the hr_razor_drivecasing branch May 22, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants