Add and apply EmptyLineAfterGuardClause rule

We were inconsistent on this one. I consider it particularly useful when
a method starts with a `return` statement.

In other cases, we probably shouldn't have a guard rule in the middle of
a method in any case, but that's a different refactoring.
This commit is contained in:
Javi Martín
2019-10-24 16:19:27 +02:00
parent db97f9d08c
commit d0d681a44b
69 changed files with 102 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ class EvaluationCommentEmail
def related_users
return [] if comment.commentable.nil?
comment.commentable
.admin_and_valuator_users_associated
.reject { |associated_user| associated_user.user == comment.author }