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

Improve pattern matching when user is likely providing camel humps #75757

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #17275

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 5, 2024 21:58
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 5, 2024
comparison = (!this.IsCaseSensitive).CompareTo(!other.IsCaseSensitive);
if (comparison != 0)
return comparison;
switch (this.IsCaseSensitive, other.IsCaseSensitive)
Copy link
Member Author

Choose a reason for hiding this comment

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

same as before. just clearer imo.

@@ -170,15 +182,31 @@ private static bool ContainsUpperCaseLetter(string pattern)
}
else
{
var isCaseSensitive = _compareInfo.IsPrefix(candidate, patternChunk.Text);
Copy link
Member

Choose a reason for hiding this comment

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

isPrefix?

Copy link
Member Author

Choose a reason for hiding this comment

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

no. This is stating if it's case sensitive or not. if it's a prefix that it is, otherwise it isn't and it must have been case inseisitive.

// See if we can find a camel case match.
if (candidateHumps.Count == 0)
StringBreaker.AddWordParts(candidate, ref candidateHumps.AsRef());
{
Copy link
Member

Choose a reason for hiding this comment

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

this code block looks a bit confusing

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure what to do about that :)

Copy link
Member

@genlu genlu left a comment

Choose a reason for hiding this comment

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

:shipit:

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 VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intellisense + Capital Letters
3 participants