From 9b20c3b3857f85270cecaf3c72b0eee99dc2c202 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sun, 7 Jun 2020 16:46:39 +0200 Subject: [PATCH] Disable unneeded Rubocop rules --- .rubocop.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b02762c..7e244ab 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.1 + TargetRubyVersion: 2.4 # We use a different style where we add the short license header just below the # magic comments separated by an empty comment line. Unfortunately, this cop @@ -15,6 +15,12 @@ Layout/MultilineMethodCallIndentation: Layout/MultilineOperationIndentation: Enabled: false +# To emulate parent classes in the standards library and associated behavior +# with default rescues, we sometimes inherit direct;ly from Exception or related +# classes +Lint/InheritException: + Enabled: false + # Sometimes we want to capture all exceptions. We need to make sure to re-raise # these again in any case. Lint/RescueException: @@ -74,6 +80,10 @@ Style/DoubleNegation: Style/EmptyMethod: EnforcedStyle: expanded +# Most predicated are not available in our supported version of Ruby 2.1 +Style/NumericPredicate: + Enabled: false + Style/PercentLiteralDelimiters: PreferredDelimiters: '%w': '[]' @@ -84,6 +94,11 @@ Style/PercentLiteralDelimiters: Style/RedundantSelf: Enabled: false +# Frozen string takes care of most strings for Ribies where this is supported +# Sometimes, we do want to make sure though. +Style/RedundantFreeze: + Enabled: false + # Doesn't work with Refinements and is sometimes clearer with the expanded # version Style/SymbolProc: @@ -101,4 +116,3 @@ Style/RescueModifier: # Use %w when it makes sense. Use literal arrays where it is more clear. Style/WordArray: Enabled: false -