aboutsummaryrefslogtreecommitdiffstats
path: root/.rubocop.yml
diff options
context:
space:
mode:
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml27
1 files changed, 20 insertions, 7 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 3c765d5b1d..954ab3b1cb 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,3 +1,5 @@
+require: './ci/custom_cops/lib/custom_cops'
+
AllCops:
TargetRubyVersion: 2.4
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
@@ -7,6 +9,17 @@ AllCops:
- '**/templates/**/*'
- '**/vendor/**/*'
- 'actionpack/lib/action_dispatch/journey/parser.rb'
+ - 'railties/test/fixtures/tmp/**/*'
+
+# Prefer assert_not_x over refute_x
+CustomCops/RefuteNot:
+ Include:
+ - '**/test/**/*'
+
+# Prefer assert_not over assert !
+CustomCops/AssertNot:
+ Include:
+ - '**/test/**/*'
# Prefer &&/|| over and/or.
Style/AndOr:
@@ -29,6 +42,13 @@ Layout/CommentIndentation:
Layout/ElseAlignment:
Enabled: true
+# Align `end` with the matching keyword or starting expression except for
+# assignments, where it should be aligned with the LHS.
+Layout/EndAlignment:
+ Enabled: true
+ EnforcedStyleAlignWith: variable
+ AutoCorrect: true
+
Layout/EmptyLineAfterMagicComment:
Enabled: true
@@ -138,13 +158,6 @@ Layout/TrailingWhitespace:
Style/UnneededPercentQ:
Enabled: true
-# Align `end` with the matching keyword or starting expression except for
-# assignments, where it should be aligned with the LHS.
-Lint/EndAlignment:
- Enabled: true
- EnforcedStyleAlignWith: variable
- AutoCorrect: true
-
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true