diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 0aad776bab..6f8953a32f 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -79,7 +79,7 @@ Metrics/PerceivedComplexity: Enabled: false # GitHub diff UI wraps beyond 118 characters (so that's the goal) -Metrics/LineLength: +Layout/LineLength: Max: 170 # ignore manpage comments and long single-line strings IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :'] diff --git a/Library/.rubocop_cask.yml b/Library/.rubocop_cask.yml index d779e664d4..2c128a436a 100644 --- a/Library/.rubocop_cask.yml +++ b/Library/.rubocop_cask.yml @@ -33,7 +33,7 @@ Layout/FirstHashElementIndentation: EnforcedStyle: align_braces # Casks often contain long URLs and file paths. -Metrics/LineLength: +Layout/LineLength: Enabled: false # Casks don't need documentation. diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 5a09e7ca9e..6ebbe322b2 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -62,7 +62,7 @@ Metrics/PerceivedComplexity: Max: 100 # GitHub diff UI wraps beyond 118 characters -Metrics/LineLength: +Layout/LineLength: Max: 118 # ignore manpage comments IgnoredPatterns: ['#: '] diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index db541ed9ae..a536aa326f 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -5,7 +5,7 @@ require "erb" require "ostruct" require "cli/parser" # Require all commands -Dir.glob("#{HOMEBREW_LIBRARY_PATH}/{dev-,}cmd/*.rb").each { |cmd| require cmd } +Dir.glob("#{HOMEBREW_LIBRARY_PATH}/{dev-,}cmd/*.rb").sort.each { |cmd| require cmd } module Homebrew module_function diff --git a/Library/Homebrew/test/rubocops/patches_spec.rb b/Library/Homebrew/test/rubocops/patches_spec.rb index cd7d628fbb..77c72638c9 100644 --- a/Library/Homebrew/test/rubocops/patches_spec.rb +++ b/Library/Homebrew/test/rubocops/patches_spec.rb @@ -88,9 +88,9 @@ describe RuboCop::Cop::FormulaAudit::Patches do line: 5, column: 5, source: source }] - # rubocop:disable Metrics/LineLength + # rubocop:disable Layout/LineLength elsif patch_url.match?(%r{https?://patch-diff\.githubusercontent\.com/raw/(.+)/(.+)/pull/(.+)\.(?:diff|patch)}) - # rubocop:enable Metrics/LineLength + # rubocop:enable Layout/LineLength [{ message: <<~EOS, use GitHub pull request URLs: @@ -225,9 +225,9 @@ describe RuboCop::Cop::FormulaAudit::Patches do line: 5, column: 9, source: source }] - # rubocop:disable Metrics/LineLength + # rubocop:disable Layout/LineLength elsif patch_url.match?(%r{https?://patch-diff\.githubusercontent\.com/raw/(.+)/(.+)/pull/(.+)\.(?:diff|patch)}) - # rubocop:enable Metrics/LineLength + # rubocop:enable Layout/LineLength [{ message: <<~EOS, use GitHub pull request URLs: