- Add maint/RunCoverage script to allow gathering Clang coverage locally more easily
- Add LCOV exclusion comments to unreachable code
- Add a filtering script so that the CI job respects LCOV_EXCL_* comments
It's not available on Windows, but we hadn't noticed this because it's
provided by the Git for Windows tools which I have installed. This is
not good practice to require these tools as a build dependency.
I have replaced "head -1" with "pcre2grep -m1 .*" which matches and
prints the first line. For consistency, I have made the same change on
Unix.
Found by Clang-Analyze in #576
This test fails without the code fix, which required correcting the way
the pcre2grep tests are run with valgrind.
The new test passes with the code changes made.