Syntax indexer: Catch invalid a-Z/A-Z ranges in regexps
ClosedPublic

Authored by dhaumann on Sep 14 2017, 8:48 PM.

Details

Summary

Motivated by incorrect regular expressions of the form [a-zA-z] or [a-Z], this patch extends the highlighting indexer to check for this kind of errors. This, however, is only a heuristic, so theoretically, we may have false positives. This is not an issue so far, though. In fact, this check detects two more issues, which are fixed with this change as well.

Test Plan

make test

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Lint Skipped
Unit
Unit Tests Skipped
dhaumann created this revision.Sep 14 2017, 8:48 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 14 2017, 8:48 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
cullmann accepted this revision.Sep 15 2017, 7:09 AM

Looks reasonable, one consistency check more is always good!
(hehe, and even found already things)

This revision is now accepted and ready to land.Sep 15 2017, 7:09 AM