diff options
Diffstat (limited to '.rubocop.yml')
-rw-r--r-- | .rubocop.yml | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 7327f1e631..3e15d34dbd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,3 @@ -require: './ci/custom_cops/lib/custom_cops' - AllCops: TargetRubyVersion: 2.4 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop @@ -11,13 +9,20 @@ AllCops: - 'actionpack/lib/action_dispatch/journey/parser.rb' - 'railties/test/fixtures/tmp/**/*' -# Prefer assert_not_x over refute_x -CustomCops/RefuteNot: - Include: +Performance: + Exclude: - '**/test/**/*' +Rails: + Enabled: true + # Prefer assert_not over assert ! -CustomCops/AssertNot: +Rails/AssertNot: + Include: + - '**/test/**/*' + +# Prefer assert_not_x over refute_x +Rails/RefuteMethods: Include: - '**/test/**/*' @@ -52,6 +57,9 @@ Layout/EndAlignment: Layout/EmptyLineAfterMagicComment: Enabled: true +Layout/EmptyLinesAroundBlockBody: + Enabled: true + # In a regular class definition, no empty lines around the body. Layout/EmptyLinesAroundClassBody: Enabled: true @@ -176,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 |