-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Introduce MIX_OF_LOWER_AND_UPPER_CHAR_CASE_IN_RANGE warning #3433
Comments
Hmm...yes, this does seem like it could cause strange errors. On the other hand, has this ever come up? Usually I try to avoid work unless it's solving a known problem haha. |
I've encountered the error during fixing |
Understood. Well I would welcome a PR :) I'd definitely love to get the case insensitive option merged so I can try to review some of your other work...I start work for my new galactic overlord on 4 January and it would be nice to get a stable set up... |
It would be good to take a look at this PR while I'm fixing the rest case insensitive issues: #3349 It resolves a lot of issues including character ones (but it should be merged after case insensitive PR). |
I started testing our grammars-v4 and encountered some subtle cases with the current warning that related to Unicode ranges. Probably I was too fast about the correct solution here, but I'll resolve it (restrict to ANSI characters) or revert it tomorrow. Sorry. Yet another point for including grammars-v4 to the test infrastructure in some way (integration testing). |
Consider the following set:
[A-z]
. Most likely it's an incorrect definition because the rangecontains nonimplied characters:
Correct and clear definition:
[A-Za-z]
.If these characters are implied, they can be added explicitly:
I suggest adding at least a new warning
MIX_OF_LOWER_AND_UPPER_CHAR_CASE_IN_RANGE
. It's especially actual if use thecaseInsensitivity
option. Or name it asRANGE_PROBABLY_CONTAINS_NOT_IMPLIED_CHARACTERS
.@parrt what do you think?
The text was updated successfully, but these errors were encountered: