-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make sure all internal lists do not rely on keywords order #117
Conversation
962aa45
to
951d50f
Compare
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.
Not a fan of it but is ok from my pow
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 are 2 mixed concerns in this PR, one of them wasn't in the original PR. There should at least be 2 commits, each with meaningful commit messages that don't just tell us what you did, but why you did it. If you want things to go fast, I suggest you create several PRs, one for each commit, with good commit messages and explanations, rather than pinging us in the middle of the night, only one hour after creating your PR. And by "suggest", I of course mean "require".
return $res; | ||
} | ||
|
||
public function testInternalKeywordListsAreSortedForEasierMaintenance(): void |
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 think that this should be a code style check rather than an unit test.
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.
If you know how, then great and definitely tell me, if not, let's move with this PR. In #106 I need to add many keywords and I want to make sure the git diff is minimal for now and long term.
as requested in #107 (review)
Into 1.4.x as this is needed for #106 bugfix where the lists are massively updated based on exact SQL specs.
We keep the lists alpha sorted for easier maintenance but resort them by length in the tokenizer for longest match.
The lists should not be defined sorted by length, as with comming bugfix PR, the sorting by length will no longer be needed, as there is nothing like "multi-word reserved keyword".