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

Rethink case sensitivity comparison for entities #1439

Open
4 of 5 tasks
pavelevap opened this issue May 3, 2019 · 0 comments
Open
4 of 5 tasks

Rethink case sensitivity comparison for entities #1439

pavelevap opened this issue May 3, 2019 · 0 comments
Assignees
Labels
improvement Improvement of an existing functionality. See "feature" for new features. scope: core Core VersionPress functionality like tracking actions, creating Git commits, etc.
Milestone

Comments

@pavelevap
Copy link
Collaborator

pavelevap commented May 3, 2019

History:

  • Values for ignored-entities and frequently-written were originally compared as case-sensitive.
  • But during work on issue Searching (filtering) commits #586 were values changed to case-insensitive to handle commit filtering in QueryLanguageUtils::createRulesFromQueries, see following commits: 2330858 and b54109f.
  • Recognizing capital values for entities was fixed in Capitalized values aren't handled correctly #1429.
  • And now we should rethink usage of strtolower() in QueryLanguageUtils::createRulesFromQueries and QueryLanguageUtils::entityMatchesSomeRule.

Plan:

Tests:

  • We could add some capitalized values into entityMatchesRightQuery and entityDoesntMatchWrongQuery.
  • Revert case-insensitive assertEquals() from queryLanguageUtilsCreatesCorrectRules and queryLanguageUtilsGeneratesCorrectGitLogQuery and check if it works.
  • Some tests from QueryLanguageUtilsTest and EntityInfoTest probably duplicates some assumptions now. Yes, they are similar, but EntityInfoTest is testing wrapper functions like isIgnoredEntity() and EntityInfo object, so they are not exact duplicates.
@pavelevap pavelevap added improvement Improvement of an existing functionality. See "feature" for new features. scope: core Core VersionPress functionality like tracking actions, creating Git commits, etc. labels May 3, 2019
@pavelevap pavelevap self-assigned this May 3, 2019
@pavelevap pavelevap added this to the 4.0 milestone May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement of an existing functionality. See "feature" for new features. scope: core Core VersionPress functionality like tracking actions, creating Git commits, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant