Update rust fmt for new tool support and code parse error handling.

Review Request #11577 — Created April 6, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

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

The new version of the tool also handles the case where a .rs file
can't be parsed due to a syntax error. Previously, we'd log the error
but the tool would claim it passed without issues. The new version
parses any error lines it finds and reports them as comments.

Unit tests pass on Python 2.7 and 3.x.

Summary ID
Update rust fmt for new tool support and code parse error handling.
This updates `RustfmtTool` to subclass the newer `BaseTool`, and to use the newer features it offers (dependencies, improved file extension handling, and centralized base command building). The new version of the tool also handles the case where a `.rs` file can't be parsed due to a syntax error. Previously, we'd log the error but the tool would claim it passed without issues. The new version parses any error lines it finds and reports them as comments.
7b71bf419e233b1c796c7be77ac6ddce25319d67
Description From Last Updated

Copy-pasteo: pyflakes -> rustfmt

daviddavid
david
  1. 
      
  2. bot/reviewbot/tools/rustfmt.py (Diff revision 1)
     
     
    Show all issues

    Copy-pasteo: pyflakes -> rustfmt

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (85a2360)