Add a setting for all review bots to skip posting a review if there were no files processed.
Review Request #8192 — Created May 27, 2016 and discarded
Add a setting for all review tools to skip posting a review if there were no files processed. I'm not a big fan of the variable naming, it seems confusing, but I couldn't think of better ones. Suggestions are welcome.
I've been using this for a while locally and finally polished it up a bit for review.
I have just the PEP8 and pyflakes bots enabled.
- Setting defaults to off
- Posting a powershell file results in a review posted.
- Posting a python file results in a review posted.
- Turn setting on for both bots
- Posting a powershell file results in silent bots (verified by logging).
- Posting a python file results in a review posted.
- Revision 2 is currently untested as I ran in to some issues with trying to manage the settings entries in the database through django. I may need some assistance if you'd like me to test it before submission *
Description | From | Last Updated |
---|---|---|
Also, you have a typo in your testing done: "pythong" |
brennie | |
Can you clean up your testing done? We have support for lists via markdown, and Verifications really doesn't belong there. |
brennie | |
This should be in __init__, as it is an attribute of the instance, not the class itself. These other attributes … |
brennie | |
We don't really need this here. We can pull the setting out when checking it. Also, we should call this … |
brennie | |
The try should be inside the if in this configuration. |
brennie | |
Format as: if (not review.ignore_irrelevant or (review.ignore_irrelevant and review.relevant_review)): Also, this is logically equivalent to: not review.ignore_irrelevant or review.relevant_review |
brennie | |
We use signgle quotes for all strings. |
brennie | |
Single quotes for strings. |
brennie | |
Remove this. |
brennie | |
Blank line between these. |
brennie | |
post_trivial. |
brennie | |
post_trivial and it should default to True. |
brennie | |
Single quotes. |
brennie |
-
-
Can you clean up your testing done? We have support for lists via markdown, and
Verifications
really doesn't belong there. -
This should be in
__init__
, as it is an attribute of the instance, not the class itself.These other attributes should also be moved into
__init__
but that doesn't need to be done now.Also, can we use the term "trivial review" to refer a review with no processed files?
-
We don't really need this here. We can pull the setting out when checking it.
Also, we should call this
post_empty_reviews
. -
-
Format as:
if (not review.ignore_irrelevant or (review.ignore_irrelevant and review.relevant_review)):
Also, this is logically equivalent to:
not review.ignore_irrelevant or review.relevant_review
-
-
-
-
-
-
-
- Testing Done:
-
I have just the PEP8 and pyflakes bots enabled.
~ Verifications
~ - Setting defaults to off
- Posting a powershell file results in a review posted.
- Posting a python file results in a review posted.
+ - Turn setting on for both bots
- Posting a powershell file results in silent bots (verified by logging).
- Posting a python file results in a review posted.
~ * Setting defaults to off
~ * Posting a powershell file results in a review posted.
~ * Posting a python file results in a review posted.
~ ~ ~ - Revision 2 is currently untested as I ran in to some issues with trying to manage the settings entries in the database through django. I may need some assistance if you'd like me to test it before submission *
- * Turn setting on for both bots
- * Posting a powershell file results in silent bots (verified by logging).
- * Posting a pythong file results in a review posted.
- - Setting defaults to off