Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix 273 #294
This PR addresses issue and feature request in #273. I've made separate commit on this.
Although the owner suggested using https://github.com/mysticatea/regexpp, I decide not to use it for performance considerations -- There would be many regular expression in a mature codebase and we can not afford the extra regular expression parse + replace cycle only to find whether there is any escapable sequence.
A slightly off-topic nitpick.
Would it really be that slow? We could eventually cache the result and reuse it in other regexp-related rules (or maybe even across projects). Even if it were substantially slower, we may value correctness and maintainability over speed, especially for a linter (unless it was really slow).
Also a mature codebase with a lot of unique regular expressions sounds like a nightmare.
I'm not saying this PR should not be accepted, only that the argument against
@futpib Upgraded the branch. The new lowercase detection approach is
The fixer approach is