Merge pull request #11664 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.18.3

build(deps): bump rubocop from 1.17.0 to 1.18.3 in /Library/Homebrew
This commit is contained in:
Nanda H Krishna 2021-07-08 13:03:51 +05:30 committed by GitHub
commit d463daf63d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 141 additions and 34 deletions

View File

@ -84,6 +84,25 @@ Naming/HeredocDelimiterNaming:
ForbiddenDelimiters: ForbiddenDelimiters:
- END, EOD, EOF - END, EOD, EOF
Naming/InclusiveLanguage:
CheckStrings: true
FlaggedTerms:
# TODO: If possible, make this stricter.
slave:
AllowedRegex:
- "gitslave" # Used in formula `gitslave`
- "log_slave" # Used in formula `ssdb`
- "ssdb_slave" # Used in formula `ssdb`
- "var_slave" # Used in formula `ssdb`
- "patches/13_fix_scope_for_show_slave_status_data.patch" # Used in formula `mytop`
blacklist:
AllowedRegex:
- "--listBlacklist" # Used in formula `xmlsectool`
whitelist:
AllowedRegex:
- "--error-white-list" # For an option passed to `srb` in dev-cmd/typecheck.rb
- "--repo-whitelist" # Used in formula `atlantis`
Naming/MethodName: Naming/MethodName:
IgnoredPatterns: IgnoredPatterns:
- '\A(fetch_)?HEAD\?\Z' - '\A(fetch_)?HEAD\?\Z'

View File

@ -112,7 +112,7 @@ GEM
rspec (>= 3, < 4) rspec (>= 3, < 4)
rspec_junit_formatter (0.4.1) rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0) rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.17.0) rubocop (1.18.3)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.0.0.0) parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)

View File

@ -102,11 +102,11 @@ module Cask
def installed_caskfile def installed_caskfile
installed_version = timestamped_versions.last installed_version = timestamped_versions.last
metadata_master_container_path.join(*installed_version, "Casks", "#{token}.rb") metadata_main_container_path.join(*installed_version, "Casks", "#{token}.rb")
end end
def config_path def config_path
metadata_master_container_path/"config.json" metadata_main_container_path/"config.json"
end end
def caskroom_path def caskroom_path

View File

@ -538,7 +538,7 @@ module Cask
@cask.metadata_versioned_path.rmdir_if_possible @cask.metadata_versioned_path.rmdir_if_possible
end end
@cask.metadata_master_container_path.rmdir_if_possible unless upgrade? @cask.metadata_main_container_path.rmdir_if_possible unless upgrade?
# toplevel staged distribution # toplevel staged distribution
@cask.caskroom_path.rmdir_if_possible unless upgrade? @cask.caskroom_path.rmdir_if_possible unless upgrade?

View File

@ -9,8 +9,8 @@ module Cask
METADATA_SUBDIR = ".metadata" METADATA_SUBDIR = ".metadata"
TIMESTAMP_FORMAT = "%Y%m%d%H%M%S.%L" TIMESTAMP_FORMAT = "%Y%m%d%H%M%S.%L"
def metadata_master_container_path def metadata_main_container_path
@metadata_master_container_path ||= caskroom_path.join(METADATA_SUBDIR) @metadata_main_container_path ||= caskroom_path.join(METADATA_SUBDIR)
end end
def metadata_versioned_path(version: self.version) def metadata_versioned_path(version: self.version)
@ -18,7 +18,7 @@ module Cask
raise CaskError, "Cannot create metadata path with empty version." if cask_version.empty? raise CaskError, "Cannot create metadata path with empty version." if cask_version.empty?
metadata_master_container_path.join(cask_version) metadata_main_container_path.join(cask_version)
end end
def metadata_timestamped_path(version: self.version, timestamp: :latest, create: false) def metadata_timestamped_path(version: self.version, timestamp: :latest, create: false)

View File

@ -74,7 +74,7 @@ module Homebrew
description: "Install testing dependencies required to run `brew test` <formula>.", description: "Install testing dependencies required to run `brew test` <formula>.",
}], }],
[:switch, "--HEAD", { [:switch, "--HEAD", {
description: "If <formula> defines it, install the HEAD version, aka. master, trunk, unstable.", description: "If <formula> defines it, install the HEAD version, aka. main, trunk, unstable, master.",
}], }],
[:switch, "--fetch-HEAD", { [:switch, "--fetch-HEAD", {
description: "Fetch the upstream repository to detect if the HEAD installation of the " \ description: "Fetch the upstream repository to detect if the HEAD installation of the " \

View File

@ -275,7 +275,7 @@ module Formulary
def load_file(flags:, ignore_errors:) def load_file(flags:, ignore_errors:)
if %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?<formula_name>[\w+-.@]+).rb} =~ url if %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?<formula_name>[\w+-.@]+).rb} =~ url
raise UsageError, "Installation of #{formula_name} from a GitHub commit URL is unsupported! " \ raise UsageError, "Installation of #{formula_name} from a GitHub commit URL is unsupported! " \
"`brew extract #{formula_name}` to a stable tap on GitHub instead." "`brew extract #{formula_name}` to a stable tap on GitHub instead."
elsif url.match?(%r{^(https?|ftp)://}) elsif url.match?(%r{^(https?|ftp)://})
raise UsageError, "Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! ", raise UsageError, "Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! ",
"`brew extract` or `brew create` and `brew tap-new` to create a "\ "`brew extract` or `brew create` and `brew tap-new` to create a "\

View File

@ -205,8 +205,8 @@ module RuboCop
return if tap_style_exception? :components_order_exceptions return if tap_style_exception? :components_order_exceptions
problem "`#{format_component(c1)}` (line #{line_number(c1)}) " \ problem "`#{format_component(c1)}` (line #{line_number(c1)}) " \
"should be put before `#{format_component(c2)}` " \ "should be put before `#{format_component(c2)}` " \
"(line #{line_number(c2)})" do |corrector| "(line #{line_number(c2)})" do |corrector|
reorder_components(corrector, c1, c2) reorder_components(corrector, c1, c2)
end end
end end

View File

@ -205,7 +205,7 @@ module RuboCop
find_method_with_args(body_node, :depends_on, "mpich") do find_method_with_args(body_node, :depends_on, "mpich") do
problem "Formulae in homebrew/core should use 'depends_on \"open-mpi\"' " \ problem "Formulae in homebrew/core should use 'depends_on \"open-mpi\"' " \
"instead of '#{@offensive_node.source}'." do |corrector| "instead of '#{@offensive_node.source}'." do |corrector|
corrector.replace(@offensive_node.source_range, "depends_on \"open-mpi\"") corrector.replace(@offensive_node.source_range, "depends_on \"open-mpi\"")
end end
end end
@ -340,7 +340,7 @@ module RuboCop
offending_node(str) offending_node(str)
problem "References to `#{content}` should "\ problem "References to `#{content}` should "\
"match the specified python dependency (`#{fix}`)" do |corrector| "match the specified python dependency (`#{fix}`)" do |corrector|
corrector.replace(str.source_range, "\"#{fix}\"") corrector.replace(str.source_range, "\"#{fix}\"")
end end
end end

View File

@ -1075,6 +1075,7 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::GemDeclaration include ::RuboCop::Cop::GemDeclaration
def includes_commit_reference?(param0 = T.unsafe(nil)); end
def includes_version_specification?(param0 = T.unsafe(nil)); end def includes_version_specification?(param0 = T.unsafe(nil)); end
def on_send(node); end def on_send(node); end
@ -1082,9 +1083,11 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base
def allowed_gem?(node); end def allowed_gem?(node); end
def allowed_gems; end def allowed_gems; end
def forbidden_offense?(node); end
def forbidden_style?; end def forbidden_style?; end
def message(range); end def message(range); end
def offense?(node); end def offense?(node); end
def required_offense?(node); end
def required_style?; end def required_style?; end
def version_specification?(expression); end def version_specification?(expression); end
end end
@ -1153,6 +1156,7 @@ module RuboCop::Cop::CheckLineBreakable
def contained_by_multiline_collection_that_could_be_broken_up?(node); end def contained_by_multiline_collection_that_could_be_broken_up?(node); end
def extract_breakable_node_from_elements(node, elements, max); end def extract_breakable_node_from_elements(node, elements, max); end
def extract_first_element_over_column_limit(node, elements, max); end def extract_first_element_over_column_limit(node, elements, max); end
def first_argument_is_heredoc?(node); end
def process_args(args); end def process_args(args); end
def safe_to_ignore?(node); end def safe_to_ignore?(node); end
def shift_elements_for_heredoc_arg(node, elements, index); end def shift_elements_for_heredoc_arg(node, elements, index); end
@ -3177,6 +3181,28 @@ end
RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::Alignment
extend ::RuboCop::Cop::AutoCorrector
def autocorrect(corrector, node); end
def on_dstr(node); end
private
def add_offense_and_correction(node, message); end
def always_aligned?(dstr_node); end
def always_indented?(dstr_node); end
def check_aligned(children, start_index); end
def check_indented(children); end
def strings_concatenated_with_backslash?(dstr_node); end
end
RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String)
RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String)
RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base
include ::RuboCop::Cop::CheckLineBreakable include ::RuboCop::Cop::CheckLineBreakable
include ::RuboCop::Cop::IgnoredPattern include ::RuboCop::Cop::IgnoredPattern
@ -3697,6 +3723,7 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base
def on_or_asgn(node); end def on_or_asgn(node); end
def on_pair(node); end def on_pair(node); end
def on_resbody(node); end def on_resbody(node); end
def on_sclass(node); end
def on_send(node); end def on_send(node); end
def on_special_asgn(node); end def on_special_asgn(node); end
@ -6571,6 +6598,53 @@ end
RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
def on_new_investigation; end
private
def add_offenses_for_token(token, word_locations); end
def add_to_flagged_term_hash(regex_string, term, term_definition); end
def array_to_ignorecase_regex(strings); end
def check_token?(type); end
def create_message(word); end
def create_message_for_file(word); end
def create_multiple_word_message_for_file(words); end
def create_single_word_message_for_file(word); end
def ensure_regex_string(regex); end
def find_flagged_term(word); end
def format_suggestions(suggestions); end
def investigate_filepath; end
def investigate_tokens; end
def mask_input(str); end
def preprocess_check_config; end
def preprocess_flagged_terms; end
def preprocess_suggestions(suggestions); end
def process_allowed_regex(allowed); end
def scan_for_words(input); end
def set_regexes(flagged_term_strings, allowed_strings); end
end
RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct
def position; end
def position=(_); end
def word; end
def word=(_); end
class << self
def [](*_arg0); end
def inspect; end
def members; end
def new(*_arg0); end
end
end
class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::ConfigurableEnforcedStyle
@ -7488,6 +7562,7 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::IgnoredMethods include ::RuboCop::Cop::IgnoredMethods
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::IgnoredMethods::Config extend ::RuboCop::Cop::IgnoredMethods::Config
extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::AutoCorrector
@ -7512,6 +7587,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base
def line_count_based_block_style?(node); end def line_count_based_block_style?(node); end
def line_count_based_message(node); end def line_count_based_message(node); end
def message(node); end def message(node); end
def move_comment_before_block(corrector, comment, block_node, closing_brace); end
def procedural_method?(method_name); end def procedural_method?(method_name); end
def procedural_oneliners_may_have_braces?; end def procedural_oneliners_may_have_braces?; end
def proper_block_style?(node); end def proper_block_style?(node); end
@ -7625,6 +7701,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base
def compact_node(corrector, node); end def compact_node(corrector, node); end
def compact_node_name?(node); end def compact_node_name?(node); end
def compact_replacement(node); end def compact_replacement(node); end
def configured_indentation_width; end
def indent_width; end def indent_width; end
def leading_spaces(node); end def leading_spaces(node); end
def needs_compacting?(body); end def needs_compacting?(body); end
@ -7633,6 +7710,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base
def remove_end(corrector, body); end def remove_end(corrector, body); end
def replace_namespace_keyword(corrector, node); end def replace_namespace_keyword(corrector, node); end
def split_on_double_colon(corrector, node, padding); end def split_on_double_colon(corrector, node, padding); end
def unindent(corrector, node); end
end end
RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String)
@ -7818,13 +7896,18 @@ class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base
def annotation_range(comment, margin, first_word, colon, space); end def annotation_range(comment, margin, first_word, colon, space); end
def concat_length(*args); end def concat_length(*args); end
def correct_annotation?(first_word, colon, space, note); end def correct_annotation?(first_word, colon, space, note); end
def correct_colon_annotation?(first_word, colon, space, note); end
def correct_offense(corrector, range, first_word); end
def correct_space_annotation?(first_word, colon, space, note); end
def first_comment_line?(comments, index); end def first_comment_line?(comments, index); end
def inline_comment?(comment); end def inline_comment?(comment); end
def register_offense(range, note, first_word); end def register_offense(range, note, first_word); end
def requires_colon?; end
end end
RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::CommentAnnotation::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RangeHelp
@ -10577,6 +10660,7 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
def allow_inner_slashes?; end def allow_inner_slashes?; end
def allowed_mixed_percent_r?(node); end def allowed_mixed_percent_r?(node); end
def allowed_mixed_slash?(node); end def allowed_mixed_slash?(node); end
def allowed_omit_parentheses_with_percent_r_literal?(node); end
def allowed_percent_r_literal?(node); end def allowed_percent_r_literal?(node); end
def allowed_slash_literal?(node); end def allowed_slash_literal?(node); end
def calculate_replacement(node); end def calculate_replacement(node); end
@ -10589,7 +10673,6 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
def inner_slash_for(opening_delimiter); end def inner_slash_for(opening_delimiter); end
def inner_slash_indices(node); end def inner_slash_indices(node); end
def node_body(node, include_begin_nodes: T.unsafe(nil)); end def node_body(node, include_begin_nodes: T.unsafe(nil)); end
def omit_parentheses_style?(node); end
def preferred_delimiters; end def preferred_delimiters; end
def slash_literal?(node); end def slash_literal?(node); end
end end
@ -10838,6 +10921,7 @@ class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base
def correct_to_endless(corrector, node); end def correct_to_endless(corrector, node); end
def correct_to_endless?(body_node); end def correct_to_endless?(body_node); end
def correct_to_multiline(corrector, node); end def correct_to_multiline(corrector, node); end
def disallow_endless_method_style?; end
def each_part(body); end def each_part(body); end
def method_body_source(method_body); end def method_body_source(method_body); end
def move_comment(node, corrector); end def move_comment(node, corrector); end
@ -10845,6 +10929,7 @@ class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base
end end
RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::AutoCorrector
@ -10981,12 +11066,14 @@ class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base
private private
def collect_parts(node, parts); end def collect_parts(node, parts = T.unsafe(nil)); end
def corrected_ancestor?(node); end def corrected_ancestor?(node); end
def find_topmost_plus_node(node); end def find_topmost_plus_node(node); end
def handle_quotes(parts); end def handle_quotes(parts); end
def line_end_concatenation?(node); end def line_end_concatenation?(node); end
def offensive_for_mode?(receiver_node); end
def plus_node?(node); end def plus_node?(node); end
def register_offense(topmost_plus_node, parts); end
def replacement(parts); end def replacement(parts); end
def single_quoted?(str_node); end def single_quoted?(str_node); end
def uncorrectable?(part); end def uncorrectable?(part); end

View File

@ -26891,6 +26891,7 @@ end
module RuboCop::AST::NodePattern::Sets module RuboCop::AST::NodePattern::Sets
SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped)
SET_BRANCH_REF_TAG = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = ::T.let(nil, ::T.untyped)

View File

@ -293,7 +293,7 @@ module Homebrew
end end
it "checks online and verifies that a standard license id is the same "\ it "checks online and verifies that a standard license id is the same "\
"as what is indicated on its Github repo", :needs_network do "as what is indicated on its Github repo", :needs_network do
formula_text = <<~RUBY formula_text = <<~RUBY
class Cask < Formula class Cask < Formula
url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" url "https://github.com/cask/cask/archive/v0.8.4.tar.gz"
@ -309,7 +309,7 @@ module Homebrew
end end
it "checks online and verifies that a standard license id with AND is the same "\ it "checks online and verifies that a standard license id with AND is the same "\
"as what is indicated on its Github repo", :needs_network do "as what is indicated on its Github repo", :needs_network do
formula_text = <<~RUBY formula_text = <<~RUBY
class Cask < Formula class Cask < Formula
url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" url "https://github.com/cask/cask/archive/v0.8.4.tar.gz"
@ -325,7 +325,7 @@ module Homebrew
end end
it "checks online and verifies that a standard license id with WITH is the same "\ it "checks online and verifies that a standard license id with WITH is the same "\
"as what is indicated on its Github repo", :needs_network do "as what is indicated on its Github repo", :needs_network do
formula_text = <<~RUBY formula_text = <<~RUBY
class Cask < Formula class Cask < Formula
url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" url "https://github.com/cask/cask/archive/v0.8.4.tar.gz"
@ -407,7 +407,7 @@ module Homebrew
end end
it "checks online and detects that a formula-specified license is not "\ it "checks online and detects that a formula-specified license is not "\
"the same as what is indicated on its Github repository", :needs_network do "the same as what is indicated on its Github repository", :needs_network do
formula_text = <<~RUBY formula_text = <<~RUBY
class Cask < Formula class Cask < Formula
url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" url "https://github.com/cask/cask/archive/v0.8.4.tar.gz"
@ -441,7 +441,7 @@ module Homebrew
end end
it "checks online and detects that an array of license does not contain "\ it "checks online and detects that an array of license does not contain "\
"what is indicated on its Github repository", :needs_network do "what is indicated on its Github repository", :needs_network do
formula_text = <<~RUBY formula_text = <<~RUBY
class Cask < Formula class Cask < Formula
url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" url "https://github.com/cask/cask/archive/v0.8.4.tar.gz"
@ -454,11 +454,11 @@ module Homebrew
fa.audit_license fa.audit_license
expect(fa.problems.first[:message]).to match "Formula license [\"0BSD\", \"MIT\"] "\ expect(fa.problems.first[:message]).to match "Formula license [\"0BSD\", \"MIT\"] "\
"does not match GitHub license [\"GPL-3.0\"]." "does not match GitHub license [\"GPL-3.0\"]."
end end
it "checks online and verifies that an array of license contains "\ it "checks online and verifies that an array of license contains "\
"what is indicated on its Github repository", :needs_network do "what is indicated on its Github repository", :needs_network do
formula_text = <<~RUBY formula_text = <<~RUBY
class Cask < Formula class Cask < Formula
url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" url "https://github.com/cask/cask/archive/v0.8.4.tar.gz"

View File

@ -51,7 +51,7 @@ describe RuboCop::Cop::Cask::HomepageUrlTrailingSlash do
let(:expected_offenses) do let(:expected_offenses) do
[{ [{
message: "'https://foo.brew.sh' must have a slash "\ message: "'https://foo.brew.sh' must have a slash "\
"after the domain.", "after the domain.",
severity: :convention, severity: :convention,
line: 2, line: 2,
column: 11, column: 11,

View File

@ -110,7 +110,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do
line: 3, line: 3,
column: 2, column: 2,
source: "uninstall :quit => 'com.example.foo',\n" \ source: "uninstall :quit => 'com.example.foo',\n" \
" :kext => 'com.example.foo.kext'", " :kext => 'com.example.foo.kext'",
}, { }, {
message: "`version` stanza out of order", message: "`version` stanza out of order",
severity: :convention, severity: :convention,

View File

@ -6,11 +6,11 @@ require "utils/pypi"
describe PyPI do describe PyPI do
let(:package_url) do let(:package_url) do
"https://files.pythonhosted.org/packages/b0/3f/2e1dad67eb172b6443b5eb37eb885a054a55cfd733393071499514140282/"\ "https://files.pythonhosted.org/packages/b0/3f/2e1dad67eb172b6443b5eb37eb885a054a55cfd733393071499514140282/"\
"snakemake-5.29.0.tar.gz" "snakemake-5.29.0.tar.gz"
end end
let(:old_package_url) do let(:old_package_url) do
"https://files.pythonhosted.org/packages/6f/c4/da52bfdd6168ea46a0fe2b7c983b6c34c377a8733ec177cc00b197a96a9f/"\ "https://files.pythonhosted.org/packages/6f/c4/da52bfdd6168ea46a0fe2b7c983b6c34c377a8733ec177cc00b197a96a9f/"\
"snakemake-5.28.0.tar.gz" "snakemake-5.28.0.tar.gz"
end end
describe PyPI::Package do describe PyPI::Package do

View File

@ -137,7 +137,7 @@ module Homebrew
def are_required_by_deps def are_required_by_deps
"#{"is".pluralize(reqs.count)} required by #{deps.to_sentence}, " \ "#{"is".pluralize(reqs.count)} required by #{deps.to_sentence}, " \
"which #{"is".pluralize(deps.count)} currently installed" "which #{"is".pluralize(deps.count)} currently installed"
end end
end end

View File

@ -274,10 +274,10 @@ module Utils
formatted_percent_header = formatted_percent_header =
format "%#{percent_width}s", percent_header format "%#{percent_width}s", percent_header
puts "#{formatted_index_header} | #{formatted_name_with_options_header} | "\ puts "#{formatted_index_header} | #{formatted_name_with_options_header} | "\
"#{formatted_count_header} | #{formatted_percent_header}" "#{formatted_count_header} | #{formatted_percent_header}"
columns_line = "#{"-"*index_width}:|-#{"-"*name_with_options_width}-|-"\ columns_line = "#{"-"*index_width}:|-#{"-"*name_with_options_width}-|-"\
"#{"-"*count_width}:|-#{"-"*percent_width}:" "#{"-"*count_width}:|-#{"-"*percent_width}:"
puts columns_line puts columns_line
index = 0 index = 0
@ -296,7 +296,7 @@ module Utils
format_percent((count.to_i * 100) / total_count.to_f) format_percent((count.to_i * 100) / total_count.to_f)
end end
puts "#{formatted_index} | #{formatted_name_with_options} | " \ puts "#{formatted_index} | #{formatted_name_with_options} | " \
"#{formatted_count} | #{formatted_percent}%" "#{formatted_count} | #{formatted_percent}%"
next if index > 10 next if index > 10
end end
return unless results.length > 1 return unless results.length > 1
@ -310,7 +310,7 @@ module Utils
formatted_total_percent_footer = formatted_total_percent_footer =
format "%#{percent_width}s", formatted_total_percent format "%#{percent_width}s", formatted_total_percent
puts "#{formatted_total_footer} | #{formatted_blank_footer} | "\ puts "#{formatted_total_footer} | #{formatted_blank_footer} | "\
"#{formatted_total_count_footer} | #{formatted_total_percent_footer}%" "#{formatted_total_count_footer} | #{formatted_total_percent_footer}%"
end end
def config_true?(key) def config_true?(key)

View File

@ -195,7 +195,7 @@ module PyPI
input_packages.each do |existing_package| input_packages.each do |existing_package|
if existing_package.same_package?(extra_package) && existing_package.version != extra_package.version if existing_package.same_package?(extra_package) && existing_package.version != extra_package.version
odie "Conflicting versions specified for the `#{extra_package.name}` package: "\ odie "Conflicting versions specified for the `#{extra_package.name}` package: "\
"#{existing_package.version}, #{extra_package.version}" "#{existing_package.version}, #{extra_package.version}"
end end
end end

View File

@ -81,7 +81,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec_junit_formatter
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.7.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.17.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.18.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.4/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib"