diff options
Diffstat (limited to '.rubocop.yml')
-rw-r--r-- | .rubocop.yml | 56 |
1 files changed, 49 insertions, 7 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 3c765d5b1d..3e15d34dbd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,6 +7,24 @@ AllCops: - '**/templates/**/*' - '**/vendor/**/*' - 'actionpack/lib/action_dispatch/journey/parser.rb' + - 'railties/test/fixtures/tmp/**/*' + +Performance: + Exclude: + - '**/test/**/*' + +Rails: + Enabled: true + +# Prefer assert_not over assert ! +Rails/AssertNot: + Include: + - '**/test/**/*' + +# Prefer assert_not_x over refute_x +Rails/RefuteMethods: + Include: + - '**/test/**/*' # Prefer &&/|| over and/or. Style/AndOr: @@ -29,9 +47,19 @@ 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 +Layout/EmptyLinesAroundBlockBody: + Enabled: true + # In a regular class definition, no empty lines around the body. Layout/EmptyLinesAroundClassBody: Enabled: true @@ -138,17 +166,13 @@ 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 +Lint/StringConversionInInterpolation: + Enabled: true + Style/RedundantReturn: Enabled: true AllowMultipleReturnValues: true @@ -160,3 +184,21 @@ Style/Semicolon: # Prefer Foo.method over Foo::method Style/ColonMethodCall: Enabled: true + +Style/TrivialAccessors: + Enabled: true + +Performance/FlatMap: + Enabled: true + +Performance/RedundantMerge: + Enabled: true + +Performance/StartWith: + Enabled: true + +Performance/EndWith: + Enabled: true + +Performance/RegexpMatch: + Enabled: true |