Skip to content

Switch to PCRE2

ewew ukek requested to merge ewewukek/mplint:pcre2 into master

I tried switching regular expression engine from std::regex to PCRE2 and this are the results:

Time required to process ManaVerse/src (average from 5 runs):

library time
std::regex 1m 6.393s
PCRE2 0m 2.820s

Rules that had their behavior changed:

  • debug[004] and license[005] now skip everything inside src/debug/ (it is ignored in ManaVerse CI scripts anyway).
  • all regular expressions use \s character class instead of literal space. this affects rule final[007] (it now triggers on some code inside src/debug/).

On Debian/descendants libpcre2-dev package is required, on Windows there is a MSYS2 package for pcre2.

Merge request reports