Rubocop 0.50 and target 2.3.

This commit is contained in:
Mike McQuaid 2017-09-24 19:10:57 +01:00
parent 82aa148cb2
commit 9eb51db400
5 changed files with 28 additions and 16 deletions

View File

@ -1,5 +1,5 @@
AllCops: AllCops:
TargetRubyVersion: 2.0 TargetRubyVersion: 2.3
Exclude: Exclude:
- '**/Casks/**/*' - '**/Casks/**/*'
- '**/vendor/**/*' - '**/vendor/**/*'
@ -119,7 +119,7 @@ Style/Encoding:
Enabled: true Enabled: true
# dashes in filenames are typical # dashes in filenames are typical
Style/FileName: Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/ Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
# falsely flags e.g. curl formatting arguments as format strings # falsely flags e.g. curl formatting arguments as format strings
@ -189,8 +189,25 @@ Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma EnforcedStyleForMultiline: comma
# we have too many variables like sha256 where this harms readability # we have too many variables like sha256 where this harms readability
Style/VariableNumber: Naming/VariableNumber:
Enabled: false Enabled: false
Style/WordArray: Style/WordArray:
MinSize: 4 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

View File

@ -42,12 +42,12 @@ Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys EnforcedStyle: ruby19_no_mixed_keys
# we won't change backward compatible method names # we won't change backward compatible method names
Style/MethodName: Naming/MethodName:
Exclude: Exclude:
- 'compat/**/*' - 'compat/**/*'
# we won't change backward compatible predicate names # we won't change backward compatible predicate names
Style/PredicateName: Naming/PredicateName:
Exclude: Exclude:
- 'compat/**/*' - 'compat/**/*'
NameWhitelist: is_32_bit?, is_64_bit? NameWhitelist: is_32_bit?, is_64_bit?

View File

@ -81,7 +81,7 @@ Security/MarshalLoad:
- 'utils/fork.rb' - 'utils/fork.rb'
# Offense count: 1 # Offense count: 1
Style/AccessorMethodName: Naming/AccessorMethodName:
Exclude: Exclude:
- 'extend/ENV/super.rb' - 'extend/ENV/super.rb'
@ -136,10 +136,3 @@ Style/MutableConstant:
- 'formulary.rb' - 'formulary.rb'
- 'tab.rb' - 'tab.rb'
- 'tap.rb' - 'tap.rb'
# Offense count: 8
Style/OpMethod:
Exclude:
- 'dependencies.rb'
- 'install_renamed.rb'
- 'options.rb'

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# RuboCop version used for `brew style` and `brew cask style` # RuboCop version used for `brew style` and `brew cask style`
HOMEBREW_RUBOCOP_VERSION = "0.49.1".freeze HOMEBREW_RUBOCOP_VERSION = "0.50.0"
HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.13.1".freeze # has to be updated when RuboCop version changes HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.14.2" # has to be updated when RuboCop version changes

View File

@ -11,7 +11,7 @@ module OS
module Mac module Mac
module_function 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"] raise "Loaded OS::Mac on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"]