From 552902413a634ffc943c27a56dab076110264fbb Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 21 Feb 2023 16:31:43 +0000 Subject: [PATCH] rubocop.yml: disable more metrics. Disable these in taps, too. --- Library/.rubocop.yml | 44 +++-------------------------------- Library/Homebrew/.rubocop.yml | 3 --- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index dca88f384e..1a253d3135 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -76,11 +76,6 @@ Layout/SpaceBeforeBrackets: - "/**/{Formula,Casks}/*.rb" - "**/{Formula,Casks}/*.rb" -# Keyword arguments don't have the same readability -# problems as normal parameters. -Metrics/ParameterLists: - CountKeywordArgs: false - # Allow dashes in filenames. Naming/FileName: Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/ @@ -303,42 +298,9 @@ Lint/ParenthesesAsGroupedExpression: - "/**/Formula/*.rb" - "**/Formula/*.rb" -# Most metrics don't make sense to apply for casks/formulae/taps. -Metrics/AbcSize: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" -Metrics/BlockLength: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" -Metrics/ClassLength: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" -Metrics/CyclomaticComplexity: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" -Metrics/MethodLength: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" -Metrics/ModuleLength: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" -Metrics/PerceivedComplexity: - Exclude: - - "Taps/**/*" - - "/**/{Formula,Casks}/*.rb" - - "**/{Formula,Casks}/*.rb" +# These metrics didn't end up helping. +Metrics: + Enabled: false # allow those that are standard # TODO: try to remove some of these diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 63f6ee81e9..bd8744133b 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -12,9 +12,6 @@ Layout/MultilineMethodCallIndentation: Exclude: - "**/*_spec.rb" -Metrics: - Enabled: false - Naming/PredicateName: AllowedMethods: - is_32_bit?