From bf949067039a9fadab4ffe1f2fc6576c796ab8ce Mon Sep 17 00:00:00 2001 From: rhymes Date: Sat, 2 Jan 2021 11:11:43 +0100 Subject: [PATCH] Enable new Rubocop 1.7.0 cops (#12053) --- .rubocop.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index b5174dc52..02a0f3891 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -30,6 +30,10 @@ Bundler/OrderedGems: #################### Layout ########################### +Lint/AmbiguousAssignment: + Description: 'Checks for mistyped shorthand assignments.' + Enabled: true + Layout/ClassStructure: Description: 'Enforces a configured order of definitions within a class body.' StyleGuide: '#consistent-classes' @@ -125,6 +129,11 @@ Layout/SpaceAroundMethodCallOperator: Description: 'Checks method call operators to not have spaces around them.' Enabled: true +Layout/SpaceBeforeBrackets: + Description: 'Checks for receiver with a space before the opening brackets.' + StyleGuide: '#space-in-brackets-access' + Enabled: true + #################### Lint ################################## Lint/AmbiguousBlockAssociation: @@ -395,6 +404,12 @@ Style/Encoding: Description: 'Use UTF-8 as the source file encoding.' Enabled: false +Style/HashExcept: + Description: >- + Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods + that can be replaced with `Hash#except` method. + Enabled: true + Style/ExponentialNotation: Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).' StyleGuide: '#exponential-notation'