Update cppcheck for new tool support and improve output parsing.

Review Request #11565 — Created March 30, 2021 and submitted — Latest diff uploaded

Information

ReviewBot
release-3.0.x

Reviewers

This updates CPPCheckTool to subclass the newer BaseTool, and to
use the newer features it offers (dependencies, improved configurable
file extension handling, centralized base command building, and
standardized column/severity/error code output).

The new version of the tool has safer error report parsing. The old
version used manual string parsing, and had the potential to get
confused. The new version uses a regex to better match lines.

There are a couple changes in behavior:

1) Comments on non-errors (those marked as style, performance, etc.) no
longer have issues turned off. We just use the default for the tool,
no matter what.

2) "Category" has been renamed to "Severity" and "Sub Category" to
"Error code" in the output.

Unit tests were added to cover the new parsing, and to provide
integration tests.

All unit tests pass on Python 2.7 and 3.x.

Commits

Files