summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml43
1 files changed, 35 insertions, 8 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index e5549b64503..8f611a96702 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -390,6 +390,15 @@ Style/OpMethod:
Style/ParenthesesAroundCondition:
Enabled: true
+# This cop (by default) checks for uses of methods Hash#has_key? and
+# Hash#has_value? where it enforces Hash#key? and Hash#value?
+# It is configurable to enforce the inverse, using `verbose` method
+# names also.
+# Configuration parameters: EnforcedStyle, SupportedStyles.
+# SupportedStyles: short, verbose
+Style/PreferredHashMethods:
+ Enabled: true
+
# Checks for an obsolete RuntimeException argument in raise/fail.
Style/RedundantException:
Enabled: true
@@ -494,7 +503,13 @@ Style/TrailingBlankLines:
# This cop checks for trailing comma in array and hash literals.
Style/TrailingCommaInLiteral:
- Enabled: false
+ Enabled: true
+ EnforcedStyleForMultiline: no_comma
+
+# This cop checks for trailing comma in argument lists.
+Style/TrailingCommaInArguments:
+ Enabled: true
+ EnforcedStyleForMultiline: no_comma
# Checks for %W when interpolation is not needed.
Style/UnneededCapitalW:
@@ -543,7 +558,7 @@ Style/Proc:
# branches, and conditions.
Metrics/AbcSize:
Enabled: true
- Max: 60
+ Max: 57.08
# This cop checks if the length of a block exceeds some maximum value.
Metrics/BlockLength:
@@ -562,7 +577,7 @@ Metrics/ClassLength:
# of test cases needed to validate a method.
Metrics/CyclomaticComplexity:
Enabled: true
- Max: 17
+ Max: 16
# Limit lines to 80 characters.
Metrics/LineLength:
@@ -961,7 +976,13 @@ RSpec/DescribeSymbol:
# Checks that the second argument to top level describe is the tested method
# name.
RSpec/DescribedClass:
- Enabled: false
+ Enabled: true
+
+# Checks if an example group does not include any tests.
+RSpec/EmptyExampleGroup:
+ Enabled: true
+ CustomIncludeMethods:
+ - run_permission_checks
# Checks for long example.
RSpec/ExampleLength:
@@ -981,12 +1002,18 @@ RSpec/ExampleWording:
RSpec/ExpectActual:
Enabled: true
+# Checks for opportunities to use `expect { … }.to output`.
+RSpec/ExpectOutput:
+ Enabled: true
+
# Checks the file and folder naming of the spec file.
RSpec/FilePath:
- Enabled: false
- CustomTransform:
- RuboCop: rubocop
- RSpec: rspec
+ Enabled: true
+ IgnoreMethods: true
+ Exclude:
+ - 'qa/**/*'
+ - 'spec/javascripts/fixtures/*'
+ - 'spec/requests/api/v3/*'
# Checks if there are focused specs.
RSpec/Focus: