From cd3ced48e97f8fdab67b0737ba5441d4057457e9 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 12 Mar 2020 20:39:15 +0000 Subject: [PATCH] rubocop: set LineLength to 118. GitHub diff UI wraps beyond 118 characters. This also allows enabling `Style/IfUnlessModifier` (which autocorrects). --- Library/.rubocop.yml | 4 ++-- Library/.rubocop_shared.yml | 4 ++-- Library/Homebrew/.rubocop.yml | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index af7b0209c8..b9bae1ea7c 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -78,9 +78,9 @@ Metrics/ModuleLength: Metrics/PerceivedComplexity: Enabled: false -# GitHub diff UI wraps beyond 118 characters (so that's the goal) +# GitHub diff UI wraps beyond 118 characters Layout/LineLength: - Max: 167 + Max: 118 # ignore manpage comments and long single-line strings IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :'] diff --git a/Library/.rubocop_shared.yml b/Library/.rubocop_shared.yml index 57d280ec7c..b2d8eca8df 100644 --- a/Library/.rubocop_shared.yml +++ b/Library/.rubocop_shared.yml @@ -58,9 +58,9 @@ Style/HashTransformKeys: Style/HashTransformValues: Enabled: true -# This shouldn't be enabled until LineLength is lower. +# Enabled now LineLength is lowish. Style/IfUnlessModifier: - Enabled: false + Enabled: true # Only use this for numbers >= `1_000_000`. Style/NumericLiterals: diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 6ebbe322b2..6635212f3d 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -61,12 +61,6 @@ Metrics/PerceivedComplexity: Enabled: true Max: 100 -# GitHub diff UI wraps beyond 118 characters -Layout/LineLength: - Max: 118 - # ignore manpage comments - IgnoredPatterns: ['#: '] - # we won't change backward compatible predicate names Naming/PredicateName: Exclude: