summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-30 14:06:06 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-20 14:24:39 +0200
commit07be5943788fe0b672e8c6bea6859582cbdd3d11 (patch)
tree492f5464abe2ff476f47f183833ec722dabd981c /.rubocop.yml
parent79b02e40e5842540ceff4454f6c2c51f13fc081c (diff)
downloadgitlab-ce-07be5943788fe0b672e8c6bea6859582cbdd3d11.tar.gz
Enable Style/MultilineTernaryOperator rubocop coprubocop/enable-multiline-ternary-operator-cop
Avoid multi-line ?: (the ternary operator). Use if/unless instead. See #17478
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index db0bcfadcf4..6adbda53456 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -291,6 +291,10 @@ Style/MultilineMethodDefinitionBraceLayout:
Style/MultilineOperationIndentation:
Enabled: false
+# Avoid multi-line `? :` (the ternary operator), use if/unless instead.
+Style/MultilineTernaryOperator:
+ Enabled: true
+
# Favor unless over if for negative conditions (or control flow or).
Style/NegatedIf:
Enabled: true