Update cppcheck for new tool support and improve output parsing.

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

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.

Summary ID
Update cppcheck for new tool support and improve output parsing.
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.
ec863b8e5ba1e4f863d5a98768107ccf75276ff7
Description From Last Updated

E999 SyntaxError: invalid syntax

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (7792343)
Loading...