regexp/no-dupe-disjunctions
should "de-sugar" character classes
#402
Labels
enhancement
New feature or request
Description
While writing some regexes, I noticed the
regexp/no-dupe-disjunctions
didn't say anything about a regex of this from:/a+|[abc]/
The
a
in[abc]
is clearly useless but didn't get reported. This is becauseregexp/no-dupe-disjunctions
looks at the[abc]
as a whole and only detects the overlap betweena+
and[abc]
. It doesn't understand that the overlap is really subset (witha
in[abc]
) and therefor you get this report withreport: "all"
even though the problem is trivial.Some test cases:
The text was updated successfully, but these errors were encountered: