Add a Review Bot tool for looking at Review Request field formatting

Review Request #11815 — Created Sept. 17, 2021 and updated

Information

ReviewBot
master

Reviewers

Adds a tool to Review Bot that checks line lengths on the Description
and Testing Done fields for review requests, and opens general comments
when they exceed a limit (defaulting to 79 characters). Those general
comments include suggested wrapping.

Included an automated test that tests both short and long strings for
the Description and Testing Done fields. I also tested this manually.

Summary ID
Make it possible to create Tools that run on every review request update.
a9a72c80d098db1cc1629604b68d3629aabcf189
First stab at a review request line length formatter tool thing.
868a4307b7b94a820072cbafa5f3b9ef8f338e65
Linting and documentation fixes
0014db2779e4e12a4a381980c3617c1530e42121
Rename run_on_all_review_request_changes to always_run
47ea3783f7df75e13577ccce65e2fae5383206d1
Make tool offer a suggestion on a better wrapping.
aa64609da7f66bf0c2d43e27369bce878837092c
Add a test and some other polish.
84e7aaef77f8a1347b19ba273b1100fd34bc34ad
Fix linting issues.
f4c0f8b03c239fdb2aa82354f2186906bc53fb2c
Description From Last Updated

F401 'six' imported but unused

reviewbotreviewbot

F401 'reviewbot.config.config' imported but unused

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

E501 line too long (84 > 79 characters)

reviewbotreviewbot

E501 line too long (85 > 79 characters)

reviewbotreviewbot

E225 missing whitespace around operator

reviewbotreviewbot

This mixin is probably unnecessary. Better to just have the tool set these members.

mike_conleymike_conley

Let's rename this to always_run.

mike_conleymike_conley

E501 line too long (91 > 79 characters)

reviewbotreviewbot

E501 line too long (92 > 79 characters)

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

flake8

mike_conley
mike_conley
  1. 
      
  2. extension/reviewbotext/models.py (Diff revision 2)
     
     
    Show all issues

    Let's rename this to always_run.

  3. 
      
mike_conley
  1. 
      
  2. bot/reviewbot/tools/base/mixins.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
    Show all issues

    This mixin is probably unnecessary. Better to just have the tool set these members.

  3. 
      
mike_conley
mike_conley
Review request changed
Summary:
[WIP] Add a ReviewBot tool for looking at Review Request field formatting
Add a ReviewBot tool for looking at Review Request field formatting
Description:
~  

First stab at a review request line length formatter tool thing.

  ~

Adds a tool to Review Bot that checks line lengths on the Description

  + and Testing Done fields for review requests, and opens general comments
  + when they exceed a limit (defaulting to 79 characters). Those general
  + comments include suggested wrapping.

Testing Done:
~  

Just manual testing for now. I plan on adding automated testing once

~   the implementation architecture settles.

  ~

Included an automated test that tests both short and long strings for

  ~ the Description and Testing Done fields. I also tested this manually.

Commits:
Summary ID
Make it possible to create Tools that run on every review request update.
a9a72c80d098db1cc1629604b68d3629aabcf189
First stab at a review request line length formatter tool thing.
868a4307b7b94a820072cbafa5f3b9ef8f338e65
Linting and documentation fixes
0014db2779e4e12a4a381980c3617c1530e42121
Rename run_on_all_review_request_changes to always_run
47ea3783f7df75e13577ccce65e2fae5383206d1
Make it possible to create Tools that run on every review request update.
a9a72c80d098db1cc1629604b68d3629aabcf189
First stab at a review request line length formatter tool thing.
868a4307b7b94a820072cbafa5f3b9ef8f338e65
Linting and documentation fixes
0014db2779e4e12a4a381980c3617c1530e42121
Rename run_on_all_review_request_changes to always_run
47ea3783f7df75e13577ccce65e2fae5383206d1
Make tool offer a suggestion on a better wrapping.
aa64609da7f66bf0c2d43e27369bce878837092c
Add a test and some other polish.
84e7aaef77f8a1347b19ba273b1100fd34bc34ad

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

mike_conley
mike_conley
Review request changed
Summary:
Add a ReviewBot tool for looking at Review Request field formatting
Add a Review Bot tool for looking at Review Request field formatting