diff options
| author | Mike McQuaid | 2017-09-24 19:10:57 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2017-09-24 21:23:59 +0100 | 
| commit | 9eb51db400261545822c8c03c2e9d587d70e8ad0 (patch) | |
| tree | 87bfb84c871f632f109ecdc76c53d6e99552b9c5 | |
| parent | 82aa148cb262cad831daa800da4f02d1b6e95dbf (diff) | |
| download | brew-9eb51db400261545822c8c03c2e9d587d70e8ad0.tar.bz2 | |
Rubocop 0.50 and target 2.3.
| -rw-r--r-- | Library/.rubocop.yml | 23 | ||||
| -rw-r--r-- | Library/Homebrew/.rubocop.yml | 4 | ||||
| -rw-r--r-- | Library/Homebrew/.rubocop_todo.yml | 9 | ||||
| -rw-r--r-- | Library/Homebrew/constants.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 2 | 
5 files changed, 28 insertions, 16 deletions
| diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index cb065a1a4..dd6e039b0 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -1,5 +1,5 @@  AllCops: -  TargetRubyVersion: 2.0 +  TargetRubyVersion: 2.3    Exclude:      - '**/Casks/**/*'      - '**/vendor/**/*' @@ -119,7 +119,7 @@ Style/Encoding:    Enabled: true  # dashes in filenames are typical -Style/FileName: +Naming/FileName:    Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/  # falsely flags e.g. curl formatting arguments as format strings @@ -189,8 +189,25 @@ Style/TrailingCommaInArguments:    EnforcedStyleForMultiline: comma  # we have too many variables like sha256 where this harms readability -Style/VariableNumber: +Naming/VariableNumber:    Enabled: false  Style/WordArray:    MinSize: 4 + +# we want to add this slowly and manually +Style/FrozenStringLiteralComment: +  Enabled: false + +# generally rescuing StandardError is fine +Lint/RescueWithoutErrorClass: +  Enabled: false + +# implicitly allow EOS as we use it everywhere +Naming/HeredocDelimiterNaming: +  Blacklist: +    - END, EOD, EOF + +# we output how to use interpolated strings too often +Lint/InterpolationCheck: +  Enabled: false diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 26c944529..dc4406527 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -42,12 +42,12 @@ Style/HashSyntax:    EnforcedStyle: ruby19_no_mixed_keys  # we won't change backward compatible method names -Style/MethodName: +Naming/MethodName:    Exclude:      - 'compat/**/*'  # we won't change backward compatible predicate names -Style/PredicateName: +Naming/PredicateName:    Exclude:      - 'compat/**/*'    NameWhitelist: is_32_bit?, is_64_bit? diff --git a/Library/Homebrew/.rubocop_todo.yml b/Library/Homebrew/.rubocop_todo.yml index 37518a5f0..96c2f3676 100644 --- a/Library/Homebrew/.rubocop_todo.yml +++ b/Library/Homebrew/.rubocop_todo.yml @@ -81,7 +81,7 @@ Security/MarshalLoad:      - 'utils/fork.rb'  # Offense count: 1 -Style/AccessorMethodName: +Naming/AccessorMethodName:    Exclude:      - 'extend/ENV/super.rb' @@ -136,10 +136,3 @@ Style/MutableConstant:      - 'formulary.rb'      - 'tab.rb'      - 'tap.rb' - -# Offense count: 8 -Style/OpMethod: -  Exclude: -    - 'dependencies.rb' -    - 'install_renamed.rb' -    - 'options.rb' diff --git a/Library/Homebrew/constants.rb b/Library/Homebrew/constants.rb index 23be70bcc..b122946c8 100644 --- a/Library/Homebrew/constants.rb +++ b/Library/Homebrew/constants.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true +  # RuboCop version used for `brew style` and `brew cask style` -HOMEBREW_RUBOCOP_VERSION = "0.49.1".freeze -HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.13.1".freeze # has to be updated when RuboCop version changes +HOMEBREW_RUBOCOP_VERSION = "0.50.0" +HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.14.2" # has to be updated when RuboCop version changes diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 52fa2a187..d3e5cb38c 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -11,7 +11,7 @@ module OS    module Mac      module_function -    ::MacOS = self # rubocop:disable Style/ConstantName +    ::MacOS = self # rubocop:disable Naming/ConstantName      raise "Loaded OS::Mac on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"] | 
