Update FBInfer for new tool support and improved parsing.

Review Request #11773 — Created Aug. 10, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

This updates FBInferTool to subclass the newer BaseTool, and to use
the newer features it offers (dependencies, improved file extension
handling, centralized base command building, and new comment options).

A lot of the code is now better organized, leveraging these new tool
features. Report parsing is a bit more consistent now, with results
being sorted by filename, line number, and then column number.

Most of FBInfer is straight-forward, but when using the CMake build
type, there is an extra "compile" step that generates a Makefile and
switches the build type to "make".

If working with a multi-file build type, the command will be run in
handle_files(), and the resulting report loaded.

If working with a single-file build type, handle_file() will take
over, generating reports for each file, and combining all reports into a
single report.

In either case, the result is a report. handle_files() loops over
that, adding comments to the report.

Unit tests were added for single and multi-file builds and for the
special CMake compilation step.

All unit tests pass on Python 2 and 3.

Summary ID
Update FBInfer for new tool support and improved parsing.
This updates `FBInferTool` to subclass the newer `BaseTool`, and to use the newer features it offers (dependencies, improved file extension handling, centralized base command building, and new comment options). A lot of the code is now better organized, leveraging these new tool features. Report parsing is a bit more consistent now, with results being sorted by filename, line number, and then column number. Most of FBInfer is straight-forward, but when using the CMake build type, there is an extra "compile" step that generates a Makefile and switches the build type to "make". If working with a multi-file build type, the command will be run in `handle_files()`, and the resulting report loaded. If working with a single-file build type, `handle_file()` will take over, generating reports for each file, and combining all reports into a single report. In either case, the result is a report. `handle_files()` loops over that, adding comments to the report. Unit tests were added for single and multi-file builds and for the special CMake compilation step.
76ffb21964e2145800721af88e07a9f04a737eea
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (262947e)