diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 60b912a4c3..c2d79711ee 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -17,18 +17,10 @@ Metrics/AbcSize: Max: 241 Metrics/BlockLength: Max: 86 - Exclude: - # TODO: extract more of the bottling logic - - "dev-cmd/bottle.rb" - - "test/**/*" - - "cmd/install.rb" Metrics/BlockNesting: Max: 5 Metrics/ClassLength: Max: 736 - Exclude: - - "formula.rb" - - "formula_installer.rb" Metrics/CyclomaticComplexity: Max: 68 Metrics/PerceivedComplexity: @@ -37,12 +29,6 @@ Metrics/MethodLength: Max: 232 Metrics/ModuleLength: Max: 481 - Exclude: - # TODO: extract more of the bottling logic - - "dev-cmd/bottle.rb" - # TODO: try break this down - - "utils/github.rb" - - "test/**/*" Naming/PredicateName: # Can't rename these. diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index d1c1ef3d87..ff527b4bd9 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -19,7 +19,7 @@ module Homebrew sig { returns(CLI::Parser) } def install_args - Homebrew::CLI::Parser.new do + Homebrew::CLI::Parser.new do # rubocop:disable Metrics/BlockLength description <<~EOS Install a or . Additional options specific to a may be appended to the command. diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 3af859eb19..6325d8f608 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -35,7 +35,7 @@ ALLOWABLE_HOMEBREW_REPOSITORY_LINKS = [ %r{#{Regexp.escape(HOMEBREW_LIBRARY)}/Homebrew/os/(mac|linux)/pkgconfig}, ].freeze -module Homebrew +module Homebrew # rubocop:disable Metrics/ModuleLength extend T::Sig module_function @@ -591,7 +591,7 @@ module Homebrew bottles_hash = merge_json_files(parse_json_files(args.named)) any_cellars = ["any", "any_skip_relocation"] - bottles_hash.each do |formula_name, bottle_hash| + bottles_hash.each do |formula_name, bottle_hash| # rubocop:disable Metrics/BlockLength ohai formula_name bottle = BottleSpecification.new diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 4e6b179cde..a1b70812ac 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -56,7 +56,7 @@ require "api" # system "make", "install" # end # end -class Formula +class Formula # rubocop:disable Metrics/ClassLength extend T::Sig include FileUtils diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index cbdeff3c07..9ea9834ed6 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -26,7 +26,7 @@ require "service" # Installer for a formula. # # @api private -class FormulaInstaller +class FormulaInstaller # rubocop:disable Metrics/ClassLength extend T::Sig include FormulaCellarChecks diff --git a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb index 06bacb96e0..698d292d2d 100644 --- a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb +++ b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb @@ -3,7 +3,7 @@ require "benchmark" -shared_examples "#uninstall_phase or #zap_phase" do +shared_examples "#uninstall_phase or #zap_phase" do # rubocop:disable Metrics/BlockLength subject { artifact } let(:artifact_dsl_key) { described_class.dsl_key } diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index ba93979961..21523e1194 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -17,7 +17,7 @@ module Count end end -module Homebrew +module Homebrew # rubocop:disable Metrics/ModuleLength describe FormulaTextAuditor do alias_matcher :have_data, :be_data alias_matcher :have_end, :be_end diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 1ea10a0493..723e999a99 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -63,7 +63,7 @@ TEST_DIRECTORIES = [ # work when type-checking is active. RSpec::Sorbet.allow_doubles! -RSpec.configure do |config| +RSpec.configure do |config| # rubocop:disable Metrics/BlockLength config.order = :random config.raise_errors_for_deprecations! @@ -181,7 +181,7 @@ RSpec.configure do |config| skip "Unzip is not installed." unless which("unzip") end - config.around do |example| + config.around do |example| # rubocop:disable Metrics/BlockLength def find_files return [] unless File.exist?(TEST_TMPDIR) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 7222a0b641..06faced93f 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -10,7 +10,7 @@ require "system_command" # Wrapper functions for the GitHub API. # # @api private -module GitHub +module GitHub # rubocop:disable Metrics/ModuleLength extend T::Sig include SystemCommand::Mixin