PCRE2Project / pcre2

PCRE2 development is now based here.
Other
918 stars 191 forks source link

Add lcov coverage report to CI jobs #555

Open NWilson opened 1 week ago

NWilson commented 1 week ago

There are various error cases and stray blocks of code that appear not to be covered by the unit tests.

We should do a little bit more monitoring of the lcov report, and close any loopholes.

Noticed while checking for missed lines or branches in the new extended classes code.

PhilipHazel commented 1 week ago

In the past I have had several "coverage blitzes" where I have taken time to add tests to improve coverage, and also add some LCOV comments to exclude code which can never partake in tests. However, the last time I did this was quite a while ago. You are right that it is time to do this again. Perhaps when all the current work in progress is complete?

NWilson commented 1 week ago

I can tell you've worked hard on the coverage, because overall it's excellent. No-one ever gets above 80% coverage unless they're seriously committed to exhaustive testing.

Yes, let's hoover up the coverage gaps once things have quietened down.

This doesn't block a 10.45 RC, but could be done during that time.

NWilson commented 6 days ago

We can also add Clang's scan-build (clang-tidy) static analysis. I know we already have Coverity, but that's a bit of a black box. I find Clang's scanner very good, and it can find bugs, from time to time.