Skip to content

Introduce MIX_OF_LOWER_AND_UPPER_CHAR_CASE_IN_RANGE warning #3433

@KvanTTT

Description

@KvanTTT

Consider the following set: [A-z]. Most likely it's an incorrect definition because the range

ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy

contains nonimplied characters:

[\]^_`

Correct and clear definition: [A-Za-z].

If these characters are implied, they can be added explicitly:

[A-Za-z[\\\]^_`]

I suggest adding at least a new warning MIX_OF_LOWER_AND_UPPER_CHAR_CASE_IN_RANGE. It's especially actual if use the caseInsensitivity option. Or name it as RANGE_PROBABLY_CONTAINS_NOT_IMPLIED_CHARACTERS.

@parrt what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions