Update FBInfer for new tool support and improved parsing.

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

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.

Commits

Files