rubocop: brew style --fix autocorrections.

This commit is contained in:
Mike McQuaid 2020-05-12 08:32:27 +01:00
parent b157b3aaf9
commit 12bdb38663
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
14 changed files with 19 additions and 4 deletions

View File

@ -228,7 +228,7 @@ module Cask
end end
def run(*) def run(*)
exec @path, *ARGV[1..-1] exec @path, *ARGV[1..]
end end
end end

View File

@ -37,6 +37,7 @@ module Cask
end end
attr_accessor :args attr_accessor :args
private :args= private :args=
def initialize(*args) def initialize(*args)

View File

@ -33,9 +33,11 @@ module Cask
option "--inspect", :inspect, false option "--inspect", :inspect, false
attr_accessor :format attr_accessor :format
private :format, :format= private :format, :format=
attr_accessor :stanza attr_accessor :stanza
private :stanza, :stanza= private :stanza, :stanza=
def initialize(*) def initialize(*)

View File

@ -23,6 +23,7 @@ class AbstractDownloadStrategy
attr_reader :cache, :cached_location, :url attr_reader :cache, :cached_location, :url
attr_reader :meta, :name, :version, :shutup attr_reader :meta, :name, :version, :shutup
private :meta, :name, :version, :shutup private :meta, :name, :version, :shutup
def initialize(url, name, version, **meta) def initialize(url, name, version, **meta)

View File

@ -80,7 +80,7 @@ module Hardware
# Compatibility with Mac method, which returns lowercase symbols # Compatibility with Mac method, which returns lowercase symbols
# instead of strings # instead of strings
def features def features
@features ||= flags[1..-1].map(&:intern) @features ||= flags[1..].map(&:intern)
end end
%w[aes altivec avx avx2 lm ssse3 sse4_2].each do |flag| %w[aes altivec avx avx2 lm ssse3 sse4_2].each do |flag|

View File

@ -126,6 +126,7 @@ class Formula
# The currently active {SoftwareSpec}. # The currently active {SoftwareSpec}.
# @see #determine_active_spec # @see #determine_active_spec
attr_reader :active_spec attr_reader :active_spec
protected :active_spec protected :active_spec
# A symbol to indicate currently active {SoftwareSpec}. # A symbol to indicate currently active {SoftwareSpec}.
@ -176,6 +177,7 @@ class Formula
# Defaults to true. # Defaults to true.
# @return [Boolean] # @return [Boolean]
attr_accessor :follow_installed_alias attr_accessor :follow_installed_alias
alias follow_installed_alias? follow_installed_alias alias follow_installed_alias? follow_installed_alias
# @private # @private

View File

@ -25,6 +25,7 @@ class FormulaInstaller
def self.mode_attr_accessor(*names) def self.mode_attr_accessor(*names)
attr_accessor(*names) attr_accessor(*names)
private(*names) private(*names)
names.each do |name| names.each do |name|
predicate = "#{name}?" predicate = "#{name}?"
@ -38,6 +39,7 @@ class FormulaInstaller
attr_reader :formula attr_reader :formula
attr_accessor :options, :build_bottle attr_accessor :options, :build_bottle
attr_accessor :installed_as_dependency, :installed_on_request, :link_keg attr_accessor :installed_as_dependency, :installed_on_request, :link_keg
mode_attr_accessor :show_summary_heading, :show_header mode_attr_accessor :show_summary_heading, :show_header
mode_attr_accessor :build_from_source, :force_bottle, :include_test mode_attr_accessor :build_from_source, :force_bottle, :include_test
mode_attr_accessor :ignore_deps, :only_deps, :interactive, :git mode_attr_accessor :ignore_deps, :only_deps, :interactive, :git

View File

@ -184,6 +184,7 @@ class Keg
end end
attr_reader :path, :name, :linked_keg_record, :opt_record attr_reader :path, :name, :linked_keg_record, :opt_record
protected :path protected :path
extend Forwardable extend Forwardable

View File

@ -151,6 +151,7 @@ class Requirement
include BuildEnvironment::DSL include BuildEnvironment::DSL
attr_reader :env_proc, :build attr_reader :env_proc, :build
attr_rw :fatal, :cask, :download attr_rw :fatal, :cask, :download
def satisfy(options = nil, &block) def satisfy(options = nil, &block)

View File

@ -40,6 +40,7 @@ module RuboCop
private private
attr_reader :cask_block attr_reader :cask_block
def_delegators :cask_block, :cask_node, :toplevel_stanzas, def_delegators :cask_block, :cask_node, :toplevel_stanzas,
:sorted_toplevel_stanzas :sorted_toplevel_stanzas
@ -141,10 +142,10 @@ module RuboCop
end end
home = homepage.downcase home = homepage.downcase
if (split_host = host.split(".")).length >= 3 if (split_host = host.split(".")).length >= 3
host = split_host[-2..-1].join(".") host = split_host[-2..].join(".")
end end
if (split_home = homepage.split(".")).length >= 3 if (split_home = homepage.split(".")).length >= 3
home = split_home[-2..-1].join(".") home = split_home[-2..].join(".")
end end
host == home host == home
end end

View File

@ -19,6 +19,7 @@ module RuboCop
private private
attr_reader :cask_block attr_reader :cask_block
def_delegators :cask_block, def_delegators :cask_block,
:toplevel_stanzas :toplevel_stanzas
end end

View File

@ -39,6 +39,7 @@ module RuboCop
private private
attr_reader :cask_block, :line_ops attr_reader :cask_block, :line_ops
def_delegators :cask_block, :cask_node, :toplevel_stanzas def_delegators :cask_block, :cask_node, :toplevel_stanzas
def add_offenses def add_offenses

View File

@ -31,6 +31,7 @@ module RuboCop
private private
attr_reader :cask_block attr_reader :cask_block
def_delegators :cask_block, :cask_node, :toplevel_stanzas, def_delegators :cask_block, :cask_node, :toplevel_stanzas,
:sorted_toplevel_stanzas :sorted_toplevel_stanzas

View File

@ -17,6 +17,7 @@ module RuboCop
include RangeHelp include RangeHelp
attr_accessor :file_path attr_accessor :file_path
@registry = Cop.registry @registry = Cop.registry
# This method is called by RuboCop and is the main entry point # This method is called by RuboCop and is the main entry point