Using an AST-vistor find all lookahead assertions and for each one report an issue if the sub-automaton spanned by lookahead.element and lookahead.endOfLookaheadState does not intersect the prefix of the continuation automaton and the continuation automaton does not intersect the prefix of the sub-automaton (the latter should not be considered if we know that the regex is only used as a full match).
- contributes to
-
MMF-2182 Help Java developers writing regexp running fast, with the correct amount of resources and really doing what developers intended
-
- Resolved
-
- depends upon
-
SONARJAVA-3549 Add support for automata-based analyses for regular expressions
-
- Closed
-
-
SONARJAVA-3564 Implement intersects and supersetOf helper for regex automata
-
- Closed
-
- implements
-
RSPEC-6002 Regex lookahead assertions should not be contradictory
- Active
- supercedes
-
SONARJAVA-3475 Expand the scope of S5840
-
- Closed
-