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

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

mike_conley
ReviewBot
master
reviewbot

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
Make it possible to create Tools that run on every review request update.
First stab at a review request line length formatter tool thing.
Linting and documentation fixes
Rename run_on_all_review_request_changes to always_run
Make tool offer a suggestion on a better wrapping.
Add a test and some other polish.
Fix linting issues.
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)
     
     

    Let's rename this to always_run.

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

    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
-
Make it possible to create Tools that run on every review request update.
-
First stab at a review request line length formatter tool thing.
-
Linting and documentation fixes
-
Rename run_on_all_review_request_changes to always_run
+
Make it possible to create Tools that run on every review request update.
+
First stab at a review request line length formatter tool thing.
+
Linting and documentation fixes
+
Rename run_on_all_review_request_changes to always_run
+
Make tool offer a suggestion on a better wrapping.
+
Add a test and some other polish.

Diff:

Revision 4 (+742 -96)

Show changes

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
Loading...