Add and apply Style/IfWithBooleanLiteralBranches

This rule was added in Rubocop 1.9.0.
This commit is contained in:
Javi Martín
2021-08-11 17:25:27 +02:00
parent 1b19e33e55
commit 54cced9296
2 changed files with 4 additions and 1 deletions

View File

@@ -469,6 +469,9 @@ Style/HashSyntax:
Style/IdenticalConditionalBranches:
Enabled: true
Style/IfWithBooleanLiteralBranches:
Enabled: true
Style/MethodDefParentheses:
Enabled: true

View File

@@ -12,7 +12,7 @@ class Poll
has_many :recounts
def shifts?
shifts.empty? ? false : true
!shifts.empty?
end
def unable_to_destroy?