Merge pull request #14249 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.40.0
build(deps): bump rubocop from 1.35.1 to 1.40.0 in /Library/Homebrew
This commit is contained in:
commit
ed3789a0bb
67
Dockerfile
67
Dockerfile
@ -1,36 +1,41 @@
|
|||||||
ARG version=22.04
|
ARG version=22.04
|
||||||
|
# version is passed through by Docker.
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
FROM ubuntu:"${version}"
|
FROM ubuntu:"${version}"
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# We don't want to manually pin versions, happy to use whatever
|
||||||
|
# Ubuntu thinks is best.
|
||||||
# hadolint ignore=DL3008
|
# hadolint ignore=DL3008
|
||||||
# shellcheck disable=SC2292
|
|
||||||
|
# /etc/lsb-release is checked inside the container and sets DISTRIB_RELEASE.
|
||||||
|
# shellcheck disable=SC1091,SC2154
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
&& apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
|
||||||
&& add-apt-repository -y ppa:git-core/ppa \
|
&& add-apt-repository -y ppa:git-core/ppa \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
acl \
|
acl \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
file \
|
file \
|
||||||
fonts-dejavu-core \
|
fonts-dejavu-core \
|
||||||
g++ \
|
g++ \
|
||||||
gawk \
|
gawk \
|
||||||
git \
|
git \
|
||||||
less \
|
less \
|
||||||
libz-dev \
|
libz-dev \
|
||||||
locales \
|
locales \
|
||||||
make \
|
make \
|
||||||
netbase \
|
netbase \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
sudo \
|
sudo \
|
||||||
uuid-runtime \
|
uuid-runtime \
|
||||||
tzdata \
|
tzdata \
|
||||||
jq \
|
jq \
|
||||||
&& if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install gpg; fi \
|
&& if [[ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]]; then apt-get install gpg; fi \
|
||||||
&& apt-get remove --purge -y software-properties-common \
|
&& apt-get remove --purge -y software-properties-common \
|
||||||
&& apt-get autoremove --purge -y \
|
&& apt-get autoremove --purge -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
@ -45,15 +50,15 @@ ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}
|
|||||||
WORKDIR /home/linuxbrew
|
WORKDIR /home/linuxbrew
|
||||||
|
|
||||||
RUN mkdir -p \
|
RUN mkdir -p \
|
||||||
.linuxbrew/bin \
|
.linuxbrew/bin \
|
||||||
.linuxbrew/etc \
|
.linuxbrew/etc \
|
||||||
.linuxbrew/include \
|
.linuxbrew/include \
|
||||||
.linuxbrew/lib \
|
.linuxbrew/lib \
|
||||||
.linuxbrew/opt \
|
.linuxbrew/opt \
|
||||||
.linuxbrew/sbin \
|
.linuxbrew/sbin \
|
||||||
.linuxbrew/share \
|
.linuxbrew/share \
|
||||||
.linuxbrew/var/homebrew/linked \
|
.linuxbrew/var/homebrew/linked \
|
||||||
.linuxbrew/Cellar \
|
.linuxbrew/Cellar \
|
||||||
&& ln -s ../Homebrew/bin/brew .linuxbrew/bin/brew \
|
&& ln -s ../Homebrew/bin/brew .linuxbrew/bin/brew \
|
||||||
&& git -C .linuxbrew/Homebrew remote set-url origin https://github.com/Homebrew/brew \
|
&& git -C .linuxbrew/Homebrew remote set-url origin https://github.com/Homebrew/brew \
|
||||||
&& git -C .linuxbrew/Homebrew fetch origin \
|
&& git -C .linuxbrew/Homebrew fetch origin \
|
||||||
|
@ -132,14 +132,14 @@ GEM
|
|||||||
rspec (>= 3, < 4)
|
rspec (>= 3, < 4)
|
||||||
rspec_junit_formatter (0.6.0)
|
rspec_junit_formatter (0.6.0)
|
||||||
rspec-core (>= 2, < 4, != 2.12.0)
|
rspec-core (>= 2, < 4, != 2.12.0)
|
||||||
rubocop (1.35.1)
|
rubocop (1.40.0)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.1.2.1)
|
parser (>= 3.1.2.1)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml (>= 3.2.5, < 4.0)
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.20.1, < 2.0)
|
rubocop-ast (>= 1.23.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.24.0)
|
rubocop-ast (1.24.0)
|
||||||
|
@ -508,7 +508,7 @@ else
|
|||||||
message="Please update your system curl or set HOMEBREW_CURL_PATH to a newer version.
|
message="Please update your system curl or set HOMEBREW_CURL_PATH to a newer version.
|
||||||
Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}
|
Minimum required version: ${HOMEBREW_MINIMUM_CURL_VERSION}
|
||||||
Your curl version: ${curl_name_and_version##* }
|
Your curl version: ${curl_name_and_version##* }
|
||||||
Your curl executable: $(type -p ${HOMEBREW_CURL})"
|
Your curl executable: $(type -p "${HOMEBREW_CURL}")"
|
||||||
|
|
||||||
if [[ -z ${HOMEBREW_CURL_PATH} ]]
|
if [[ -z ${HOMEBREW_CURL_PATH} ]]
|
||||||
then
|
then
|
||||||
@ -537,7 +537,7 @@ Your curl executable: $(type -p ${HOMEBREW_CURL})"
|
|||||||
message="Please update your system Git or set HOMEBREW_GIT_PATH to a newer version.
|
message="Please update your system Git or set HOMEBREW_GIT_PATH to a newer version.
|
||||||
Minimum required version: ${HOMEBREW_MINIMUM_GIT_VERSION}
|
Minimum required version: ${HOMEBREW_MINIMUM_GIT_VERSION}
|
||||||
Your Git version: ${major}.${minor}.${micro}.${build}
|
Your Git version: ${major}.${minor}.${micro}.${build}
|
||||||
Your Git executable: $(unset git && type -p ${HOMEBREW_GIT})"
|
Your Git executable: $(unset git && type -p "${HOMEBREW_GIT}")"
|
||||||
if [[ -z ${HOMEBREW_GIT_PATH} ]]
|
if [[ -z ${HOMEBREW_GIT_PATH} ]]
|
||||||
then
|
then
|
||||||
HOMEBREW_FORCE_BREWED_GIT="1"
|
HOMEBREW_FORCE_BREWED_GIT="1"
|
||||||
|
@ -416,7 +416,7 @@ module Cask
|
|||||||
add_error "cask token underscores should be replaced by hyphens" if cask.token.include? "_"
|
add_error "cask token underscores should be replaced by hyphens" if cask.token.include? "_"
|
||||||
add_error "cask token should not contain double hyphens" if cask.token.include? "--"
|
add_error "cask token should not contain double hyphens" if cask.token.include? "--"
|
||||||
|
|
||||||
if cask.token.match?(/[^a-z0-9\-]/)
|
if cask.token.match?(/[^a-z0-9-]/)
|
||||||
add_error "cask token should only contain lowercase alphanumeric characters and hyphens"
|
add_error "cask token should only contain lowercase alphanumeric characters and hyphens"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -185,31 +185,31 @@ class URL < Delegator
|
|||||||
&block
|
&block
|
||||||
)
|
)
|
||||||
super(
|
super(
|
||||||
if block
|
if block
|
||||||
LazyObject.new do
|
LazyObject.new do
|
||||||
*args = BlockDSL.new(uri, dsl: dsl, &block).call
|
*args = BlockDSL.new(uri, dsl: dsl, &block).call
|
||||||
options = args.last.is_a?(Hash) ? args.pop : {}
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
||||||
uri = T.let(args.first, T.any(URI::Generic, String))
|
uri = T.let(args.first, T.any(URI::Generic, String))
|
||||||
DSL.new(uri, **options)
|
DSL.new(uri, **options)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
DSL.new(
|
||||||
|
T.must(uri),
|
||||||
|
verified: verified,
|
||||||
|
using: using,
|
||||||
|
tag: tag,
|
||||||
|
branch: branch,
|
||||||
|
revisions: revisions,
|
||||||
|
revision: revision,
|
||||||
|
trust_cert: trust_cert,
|
||||||
|
cookies: cookies,
|
||||||
|
referer: referer,
|
||||||
|
header: header,
|
||||||
|
user_agent: user_agent,
|
||||||
|
data: data,
|
||||||
|
only_path: only_path,
|
||||||
|
)
|
||||||
end
|
end
|
||||||
else
|
|
||||||
DSL.new(
|
|
||||||
T.must(uri),
|
|
||||||
verified: verified,
|
|
||||||
using: using,
|
|
||||||
tag: tag,
|
|
||||||
branch: branch,
|
|
||||||
revisions: revisions,
|
|
||||||
revision: revision,
|
|
||||||
trust_cert: trust_cert,
|
|
||||||
cookies: cookies,
|
|
||||||
referer: referer,
|
|
||||||
header: header,
|
|
||||||
user_agent: user_agent,
|
|
||||||
data: data,
|
|
||||||
only_path: only_path,
|
|
||||||
)
|
|
||||||
end
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@from_block = !block.nil?
|
@from_block = !block.nil?
|
||||||
|
@ -200,7 +200,7 @@ module Homebrew
|
|||||||
except: args.except,
|
except: args.except,
|
||||||
spdx_license_data: spdx_license_data,
|
spdx_license_data: spdx_license_data,
|
||||||
spdx_exception_data: spdx_exception_data,
|
spdx_exception_data: spdx_exception_data,
|
||||||
style_offenses: style_offenses ? style_offenses.for_path(f.path) : nil,
|
style_offenses: style_offenses&.for_path(f.path),
|
||||||
display_cop_names: args.display_cop_names?,
|
display_cop_names: args.display_cop_names?,
|
||||||
}.compact
|
}.compact
|
||||||
|
|
||||||
|
@ -852,7 +852,7 @@ module Homebrew
|
|||||||
.gsub("This is an unsupported configuration, likely to break in " \
|
.gsub("This is an unsupported configuration, likely to break in " \
|
||||||
"the future and leave your machine in an unknown state.", "")
|
"the future and leave your machine in an unknown state.", "")
|
||||||
.gsub("System Integrity Protection status: ", "")
|
.gsub("System Integrity Protection status: ", "")
|
||||||
.delete("\t\.")
|
.delete("\t.")
|
||||||
.capitalize
|
.capitalize
|
||||||
.strip
|
.strip
|
||||||
else
|
else
|
||||||
|
@ -493,7 +493,7 @@ class FormulaInstaller
|
|||||||
# stop installation from continuing.
|
# stop installation from continuing.
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
#{formula}: #{e.message}
|
#{formula}: #{e.message}
|
||||||
'conflicts_with \"#{c.name}\"' should be removed from #{formula.path.basename}.
|
'conflicts_with "#{c.name}"' should be removed from #{formula.path.basename}.
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
raise if Homebrew::EnvConfig.developer?
|
raise if Homebrew::EnvConfig.developer?
|
||||||
|
@ -8,7 +8,6 @@ require "fileutils"
|
|||||||
require "json"
|
require "json"
|
||||||
require "json/add/exception"
|
require "json/add/exception"
|
||||||
require "ostruct"
|
require "ostruct"
|
||||||
require "pp"
|
|
||||||
require "forwardable"
|
require "forwardable"
|
||||||
|
|
||||||
# Only require "core_ext" here to ensure we're only requiring the minimum of
|
# Only require "core_ext" here to ensure we're only requiring the minimum of
|
||||||
|
@ -70,7 +70,7 @@ module Homebrew
|
|||||||
regex_prefix = Regexp.escape(match[:prefix] || "").gsub("\\-", "-")
|
regex_prefix = Regexp.escape(match[:prefix] || "").gsub("\\-", "-")
|
||||||
|
|
||||||
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
||||||
suffix = match[:suffix]&.sub(Strategy::TARBALL_EXTENSION_REGEX, "\.t")
|
suffix = match[:suffix]&.sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
|
||||||
regex_suffix = Regexp.escape(suffix || "").gsub("\\-", "-")
|
regex_suffix = Regexp.escape(suffix || "").gsub("\\-", "-")
|
||||||
|
|
||||||
# Example directory regex: `%r{href=["']?v?(\d+(?:\.\d+)+)/}i`
|
# Example directory regex: `%r{href=["']?v?(\d+(?:\.\d+)+)/}i`
|
||||||
|
@ -74,7 +74,7 @@ module Homebrew
|
|||||||
regex_prefix = Regexp.escape(T.must(match[:prefix])).gsub("\\-", "-")
|
regex_prefix = Regexp.escape(T.must(match[:prefix])).gsub("\\-", "-")
|
||||||
|
|
||||||
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
||||||
suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, "\.t")
|
suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
|
||||||
regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
|
regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
|
||||||
|
|
||||||
# Example regexes:
|
# Example regexes:
|
||||||
|
@ -60,7 +60,7 @@ module Homebrew
|
|||||||
regex_prefix = Regexp.escape(T.must(match[:prefix])).gsub("\\-", "-")
|
regex_prefix = Regexp.escape(T.must(match[:prefix])).gsub("\\-", "-")
|
||||||
|
|
||||||
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
||||||
suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, "\.t")
|
suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
|
||||||
regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
|
regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
|
||||||
|
|
||||||
# Example regex: `/href=.*?Brew[._-]v?(\d+(?:\.\d+)*)\.t/i`
|
# Example regex: `/href=.*?Brew[._-]v?(\d+(?:\.\d+)*)\.t/i`
|
||||||
|
@ -65,7 +65,7 @@ module Homebrew
|
|||||||
values[:url] = "https://pypi.org/project/#{T.must(match[:package_name]).gsub(/%20|_/, "-")}/#files"
|
values[:url] = "https://pypi.org/project/#{T.must(match[:package_name]).gsub(/%20|_/, "-")}/#files"
|
||||||
|
|
||||||
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
# Use `\.t` instead of specific tarball extensions (e.g. .tar.gz)
|
||||||
suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, "\.t")
|
suffix = T.must(match[:suffix]).sub(Strategy::TARBALL_EXTENSION_REGEX, ".t")
|
||||||
regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
|
regex_suffix = Regexp.escape(suffix).gsub("\\-", "-")
|
||||||
|
|
||||||
# Example regex: `%r{href=.*?/packages.*?/example[._-]v?(\d+(?:\.\d+)*(?:[._-]post\d+)?)\.t}i`
|
# Example regex: `%r{href=.*?/packages.*?/example[._-]v?(\d+(?:\.\d+)*(?:[._-]post\d+)?)\.t}i`
|
||||||
|
@ -643,13 +643,13 @@ module RuboCop
|
|||||||
|
|
||||||
formula_path_strings(body_node, :prefix) do |p|
|
formula_path_strings(body_node, :prefix) do |p|
|
||||||
if (match = regex_match_group(p, %r{^(/share/(info|man))$}))
|
if (match = regex_match_group(p, %r{^(/share/(info|man))$}))
|
||||||
problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[2]}}\""
|
problem ['"#', "{prefix}", match[1], '" should be "#{', match[2], '}"'].join
|
||||||
end
|
end
|
||||||
if (match = regex_match_group(p, %r{^((/share/man/)(man[1-8]))}))
|
if (match = regex_match_group(p, %r{^((/share/man/)(man[1-8]))}))
|
||||||
problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[3]}}\""
|
problem ['"#', "{prefix}", match[1], '" should be "#{', match[3], '}"'].join
|
||||||
end
|
end
|
||||||
if (match = regex_match_group(p, %r{^(/(bin|include|libexec|lib|sbin|share|Frameworks))}i))
|
if (match = regex_match_group(p, %r{^(/(bin|include|libexec|lib|sbin|share|Frameworks))}i))
|
||||||
problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[2].downcase}}\""
|
problem ['"#', "{prefix}", match[1], '" should be "#{', match[2].downcase, '}"'].join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
require "active_support/core_ext/array/access"
|
require "active_support/core_ext/array/access"
|
||||||
require "rubocops/shared/helper_functions"
|
require "rubocops/shared/helper_functions"
|
||||||
|
require "shellwords"
|
||||||
|
|
||||||
module RuboCop
|
module RuboCop
|
||||||
module Cop
|
module Cop
|
||||||
|
@ -202,7 +202,7 @@ class Sandbox
|
|||||||
|
|
||||||
def path_filter(path, type)
|
def path_filter(path, type)
|
||||||
case type
|
case type
|
||||||
when :regex then "regex \#\"#{path}\""
|
when :regex then "regex #\"#{path}\""
|
||||||
when :subpath then "subpath \"#{expand_realpath(Pathname.new(path))}\""
|
when :subpath then "subpath \"#{expand_realpath(Pathname.new(path))}\""
|
||||||
when :literal, nil then "literal \"#{expand_realpath(Pathname.new(path))}\""
|
when :literal, nil then "literal \"#{expand_realpath(Pathname.new(path))}\""
|
||||||
end
|
end
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -3287,9 +3287,13 @@ module CopHelper
|
|||||||
|
|
||||||
def autocorrect_source_file(source); end
|
def autocorrect_source_file(source); end
|
||||||
|
|
||||||
|
def configuration(); end
|
||||||
|
|
||||||
def inspect_source(source, file=T.unsafe(nil)); end
|
def inspect_source(source, file=T.unsafe(nil)); end
|
||||||
|
|
||||||
def parse_source(source, file=T.unsafe(nil)); end
|
def parse_source(source, file=T.unsafe(nil)); end
|
||||||
|
|
||||||
|
def registry(); end
|
||||||
end
|
end
|
||||||
|
|
||||||
module CopHelper
|
module CopHelper
|
||||||
@ -6776,6 +6780,7 @@ class RuboCop::AST::NodePattern::Parser
|
|||||||
end
|
end
|
||||||
|
|
||||||
module RuboCop::AST::NodePattern::Sets
|
module RuboCop::AST::NodePattern::Sets
|
||||||
|
SET_ANY_EMPTY = ::T.let(nil, ::T.untyped)
|
||||||
SET_ARM_INTEL = ::T.let(nil, ::T.untyped)
|
SET_ARM_INTEL = ::T.let(nil, ::T.untyped)
|
||||||
SET_BASH_COMPLETION_ZSH_COMPLETION_FISH_COMPLETION = ::T.let(nil, ::T.untyped)
|
SET_BASH_COMPLETION_ZSH_COMPLETION_FISH_COMPLETION = ::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)
|
||||||
@ -6784,6 +6789,7 @@ module RuboCop::AST::NodePattern::Sets
|
|||||||
SET_MAC_LINUX = ::T.let(nil, ::T.untyped)
|
SET_MAC_LINUX = ::T.let(nil, ::T.untyped)
|
||||||
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
|
SET_ON_INTEL_ON_ARM = ::T.let(nil, ::T.untyped)
|
||||||
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
|
SET_OR_NEWER_OR_OLDER = ::T.let(nil, ::T.untyped)
|
||||||
|
SET_PRESENT_ANY_BLANK_EMPTY = ::T.let(nil, ::T.untyped)
|
||||||
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
|
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
|
||||||
SET_TO_TO_NOT_NOT_TO = ::T.let(nil, ::T.untyped)
|
SET_TO_TO_NOT_NOT_TO = ::T.let(nil, ::T.untyped)
|
||||||
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
|
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
|
||||||
|
@ -37,7 +37,7 @@ describe Cask::Cmd::Reinstall, :cask do
|
|||||||
==> Removing App '.*Caffeine.app'
|
==> Removing App '.*Caffeine.app'
|
||||||
==> Dispatching zap stanza
|
==> Dispatching zap stanza
|
||||||
==> Trashing files:
|
==> Trashing files:
|
||||||
.*org\.example\.caffeine\.plist
|
.*org.example.caffeine.plist
|
||||||
==> Removing all staged versions of Cask 'local-caffeine'
|
==> Removing all staged versions of Cask 'local-caffeine'
|
||||||
==> Installing Cask local-caffeine
|
==> Installing Cask local-caffeine
|
||||||
==> Moving App 'Caffeine.app' to '.*Caffeine.app'
|
==> Moving App 'Caffeine.app' to '.*Caffeine.app'
|
||||||
|
@ -51,7 +51,7 @@ describe Homebrew::Livecheck do
|
|||||||
|
|
||||||
livecheck do
|
livecheck do
|
||||||
url "https://formulae.brew.sh/api/formula/ruby.json"
|
url "https://formulae.brew.sh/api/formula/ruby.json"
|
||||||
regex(/"stable":"(\d+(?:\.\d+)+)"/i)
|
regex(/"stable":"(\d+(?:.\d+)+)"/i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -227,7 +227,7 @@ describe Homebrew::Livecheck do
|
|||||||
|
|
||||||
livecheck do
|
livecheck do
|
||||||
url "https://formulae.brew.sh/api/formula/ruby.json"
|
url "https://formulae.brew.sh/api/formula/ruby.json"
|
||||||
regex(/"stable":"(\d+(?:\.\d+)+)"/i)
|
regex(/"stable":"(\d+(?:.\d+)+)"/i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
@ -17,14 +17,14 @@ describe RuboCop::Cop::Cask::Desc do
|
|||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo' do
|
cask 'foo' do
|
||||||
desc 'A bar program'
|
desc 'A bar program'
|
||||||
^ Description shouldn\'t start with an article.
|
^ Description shouldn't start with an article.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo' do
|
cask 'foo' do
|
||||||
desc 'The bar program'
|
desc 'The bar program'
|
||||||
^^^ Description shouldn\'t start with an article.
|
^^^ Description shouldn't start with an article.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@ -46,28 +46,28 @@ describe RuboCop::Cop::Cask::Desc do
|
|||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foobar' do
|
cask 'foobar' do
|
||||||
desc 'Foo-Bar program'
|
desc 'Foo-Bar program'
|
||||||
^^^^^^^ Description shouldn\'t start with the cask name.
|
^^^^^^^ Description shouldn't start with the cask name.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'Foo bar program'
|
desc 'Foo bar program'
|
||||||
^^^^^^^ Description shouldn\'t start with the cask name.
|
^^^^^^^ Description shouldn't start with the cask name.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'Foo-Bar program'
|
desc 'Foo-Bar program'
|
||||||
^^^^^^^ Description shouldn\'t start with the cask name.
|
^^^^^^^ Description shouldn't start with the cask name.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'Foo Bar'
|
desc 'Foo Bar'
|
||||||
^^^^^^^ Description shouldn\'t start with the cask name.
|
^^^^^^^ Description shouldn't start with the cask name.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -76,28 +76,28 @@ describe RuboCop::Cop::Cask::Desc do
|
|||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'macOS status bar monitor'
|
desc 'macOS status bar monitor'
|
||||||
^^^^^ Description shouldn\'t contain the platform.
|
^^^^^ Description shouldn't contain the platform.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'Toggles dark mode on Mac OS Mojave'
|
desc 'Toggles dark mode on Mac OS Mojave'
|
||||||
^^^^^^ Description shouldn\'t contain the platform.
|
^^^^^^ Description shouldn't contain the platform.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'Better input source switcher for OS X'
|
desc 'Better input source switcher for OS X'
|
||||||
^^^^ Description shouldn\'t contain the platform.
|
^^^^ Description shouldn't contain the platform.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
expect_offense <<~RUBY, "/homebrew-cask/Casks/foo.rb"
|
||||||
cask 'foo-bar' do
|
cask 'foo-bar' do
|
||||||
desc 'Media Manager for Mac OS X'
|
desc 'Media Manager for Mac OS X'
|
||||||
^^^^^^^^ Description shouldn\'t contain the platform.
|
^^^^^^^^ Description shouldn't contain the platform.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ describe RuboCop::Cop::Cask::Desc do
|
|||||||
expect_offense <<~RUBY
|
expect_offense <<~RUBY
|
||||||
cask 'foo' do
|
cask 'foo' do
|
||||||
desc 'Application for managing macOS virtual machines on macOS'
|
desc 'Application for managing macOS virtual machines on macOS'
|
||||||
^^^^^ Description shouldn\'t contain the platform.
|
^^^^^ Description shouldn't contain the platform.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ describe RuboCop::Cop::FormulaAudit::Caveats do
|
|||||||
url "https://brew.sh/foo-1.0.tgz"
|
url "https://brew.sh/foo-1.0.tgz"
|
||||||
def caveats
|
def caveats
|
||||||
"setuid"
|
"setuid"
|
||||||
^^^^^^^^ Don\'t recommend setuid in the caveats, suggest sudo instead.
|
^^^^^^^^ Don't recommend setuid in the caveats, suggest sudo instead.
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
@ -63,7 +63,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
|
|||||||
livecheck do
|
livecheck do
|
||||||
^^^^^^^^^^^^ `livecheck` (line 7) should be put before `bottle` (line 5)
|
^^^^^^^^^^^^ `livecheck` (line 7) should be put before `bottle` (line 5)
|
||||||
url "https://brew.sh/foo/versions/"
|
url "https://brew.sh/foo/versions/"
|
||||||
regex(/href=.+?foo-(\d+(?:\.\d+)+)\.t/)
|
regex(/href=.+?foo-(\d+(?:.\d+)+).t/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -75,7 +75,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do
|
|||||||
|
|
||||||
livecheck do
|
livecheck do
|
||||||
url "https://brew.sh/foo/versions/"
|
url "https://brew.sh/foo/versions/"
|
||||||
regex(/href=.+?foo-(\d+(?:\.\d+)+)\.t/)
|
regex(/href=.+?foo-(\d+(?:.\d+)+).t/)
|
||||||
end
|
end
|
||||||
|
|
||||||
bottle :unneeded
|
bottle :unneeded
|
||||||
|
@ -85,7 +85,7 @@ describe RuboCop::Cop::FormulaAudit::Desc do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
desc 'An aardvark'
|
desc 'An aardvark'
|
||||||
^^ Description shouldn\'t start with an article.
|
^^ Description shouldn't start with an article.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ describe RuboCop::Cop::FormulaAudit::Desc do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
desc 'The aardvark'
|
desc 'The aardvark'
|
||||||
^^^ Description shouldn\'t start with an article.
|
^^^ Description shouldn't start with an article.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -113,7 +113,7 @@ describe RuboCop::Cop::FormulaAudit::Desc do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
desc 'Foo is a foobar'
|
desc 'Foo is a foobar'
|
||||||
^^^ Description shouldn\'t start with the formula name.
|
^^^ Description shouldn't start with the formula name.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
@ -12,7 +12,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
depends_on :automake
|
depends_on :automake
|
||||||
^^^^^^^^^^^^^^^^^^^^ :automake is deprecated. Usage should be \"automake\".
|
^^^^^^^^^^^^^^^^^^^^ :automake is deprecated. Usage should be "automake".
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -22,7 +22,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
depends_on :autoconf
|
depends_on :autoconf
|
||||||
^^^^^^^^^^^^^^^^^^^^ :autoconf is deprecated. Usage should be \"autoconf\".
|
^^^^^^^^^^^^^^^^^^^^ :autoconf is deprecated. Usage should be "autoconf".
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -32,7 +32,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
depends_on :libtool
|
depends_on :libtool
|
||||||
^^^^^^^^^^^^^^^^^^^ :libtool is deprecated. Usage should be \"libtool\".
|
^^^^^^^^^^^^^^^^^^^ :libtool is deprecated. Usage should be "libtool".
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -42,7 +42,7 @@ describe RuboCop::Cop::FormulaAudit::Lines do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
depends_on :apr
|
depends_on :apr
|
||||||
^^^^^^^^^^^^^^^ :apr is deprecated. Usage should be \"apr-util\".
|
^^^^^^^^^^^^^^^ :apr is deprecated. Usage should be "apr-util".
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
@ -15,7 +15,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
system "foo bar"
|
system "foo bar"
|
||||||
^^^^^^^^^ Separate `system` commands into `\"foo\", \"bar\"`
|
^^^^^^^^^ Separate `system` commands into `"foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -34,7 +34,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
system "\#{bin}/foo bar"
|
system "\#{bin}/foo bar"
|
||||||
^^^^^^^^^^^^^^^^ Separate `system` commands into `\"\#{bin}/foo\", \"bar\"`
|
^^^^^^^^^^^^^^^^ Separate `system` commands into `"\#{bin}/foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -83,7 +83,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
Utils.popen_read("foo bar")
|
Utils.popen_read("foo bar")
|
||||||
^^^^^^^^^ Separate `Utils.popen_read` commands into `\"foo\", \"bar\"`
|
^^^^^^^^^ Separate `Utils.popen_read` commands into `"foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -102,7 +102,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
Utils.safe_popen_read("foo bar")
|
Utils.safe_popen_read("foo bar")
|
||||||
^^^^^^^^^ Separate `Utils.safe_popen_read` commands into `\"foo\", \"bar\"`
|
^^^^^^^^^ Separate `Utils.safe_popen_read` commands into `"foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -121,7 +121,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
Utils.popen_write("foo bar")
|
Utils.popen_write("foo bar")
|
||||||
^^^^^^^^^ Separate `Utils.popen_write` commands into `\"foo\", \"bar\"`
|
^^^^^^^^^ Separate `Utils.popen_write` commands into `"foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -140,7 +140,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
Utils.safe_popen_write("foo bar")
|
Utils.safe_popen_write("foo bar")
|
||||||
^^^^^^^^^ Separate `Utils.safe_popen_write` commands into `\"foo\", \"bar\"`
|
^^^^^^^^^ Separate `Utils.safe_popen_write` commands into `"foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -159,7 +159,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
Utils.popen_read("\#{bin}/foo bar")
|
Utils.popen_read("\#{bin}/foo bar")
|
||||||
^^^^^^^^^^^^^^^^ Separate `Utils.popen_read` commands into `\"\#{bin}/foo\", \"bar\"`
|
^^^^^^^^^^^^^^^^ Separate `Utils.popen_read` commands into `"\#{bin}/foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -198,7 +198,7 @@ module RuboCop
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
def install
|
def install
|
||||||
Utils.popen_read({ "SHELL" => "bash"}, "foo bar")
|
Utils.popen_read({ "SHELL" => "bash"}, "foo bar")
|
||||||
^^^^^^^^^ Separate `Utils.popen_read` commands into `\"foo\", \"bar\"`
|
^^^^^^^^^ Separate `Utils.popen_read` commands into `"foo", "bar"`
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -222,7 +222,7 @@ module RuboCop
|
|||||||
expect_offense(<<~RUBY)
|
expect_offense(<<~RUBY)
|
||||||
fork do
|
fork do
|
||||||
exec "foo bar > output"
|
exec "foo bar > output"
|
||||||
^^^^^^^^^^^^^^^^^^ Don\'t use shell metacharacters in `exec`. Implement the logic in Ruby instead, using methods like `$stdout.reopen`.
|
^^^^^^^^^^^^^^^^^^ Don't use shell metacharacters in `exec`. Implement the logic in Ruby instead, using methods like `$stdout.reopen`.
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
@ -13,7 +13,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
|||||||
desc "foo"
|
desc "foo"
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
FileUtils.mv "hello"
|
FileUtils.mv "hello"
|
||||||
^^^^^^^^^^^^^^^^^^^^ Don\'t need \'FileUtils.\' before mv
|
^^^^^^^^^^^^^^^^^^^^ Don't need 'FileUtils.' before mv
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -24,7 +24,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
|||||||
desc "foo"
|
desc "foo"
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
inreplace "foo" do |longvar|
|
inreplace "foo" do |longvar|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \"inreplace <filenames> do |s|\" is preferred over \"|longvar|\".
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "inreplace <filenames> do |s|" is preferred over "|longvar|".
|
||||||
somerandomCall(longvar)
|
somerandomCall(longvar)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -275,7 +275,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
|||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
def install
|
def install
|
||||||
ENV["COMPILER_PATH"] = "/usr/bin/gcc"
|
ENV["COMPILER_PATH"] = "/usr/bin/gcc"
|
||||||
^^^^^^^^^^^^^^ Use \"\#{ENV.cc}\" instead of hard-coding \"gcc\"
|
^^^^^^^^^^^^^^ Use "\#{ENV.cc}" instead of hard-coding "gcc"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -339,7 +339,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
|||||||
desc "foo"
|
desc "foo"
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
depends_on "lpeg" => :lua51
|
depends_on "lpeg" => :lua51
|
||||||
^^^^^^ lua modules should be vendored rather than use deprecated `depends_on \"lpeg\" => :lua51`
|
^^^^^^ lua modules should be vendored rather than use deprecated `depends_on "lpeg" => :lua51`
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
@ -413,7 +413,7 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
|||||||
desc "foo"
|
desc "foo"
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
needs :openmp
|
needs :openmp
|
||||||
^^^^^^^^^^^^^ 'needs :openmp' should be replaced with 'depends_on \"gcc\"'
|
^^^^^^^^^^^^^ 'needs :openmp' should be replaced with 'depends_on "gcc"'
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
@ -110,7 +110,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do
|
|||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
def post_install
|
def post_install
|
||||||
return if build.without? "--without-bar"
|
return if build.without? "--without-bar"
|
||||||
^^^^^^^^^^^^^^^ Don't duplicate 'without': Use `build.without? \"bar\"` to check for \"--without-bar\"
|
^^^^^^^^^^^^^^^ Don't duplicate 'without': Use `build.without? "bar"` to check for "--without-bar"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -123,7 +123,7 @@ describe RuboCop::Cop::FormulaAudit::OptionDeclarations do
|
|||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
def post_install
|
def post_install
|
||||||
return if build.with? "--with-bar"
|
return if build.with? "--with-bar"
|
||||||
^^^^^^^^^^^^ Don't duplicate 'with': Use `build.with? \"bar\"` to check for \"--with-bar\"
|
^^^^^^^^^^^^ Don't duplicate 'with': Use `build.with? "bar"` to check for "--with-bar"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
@ -93,7 +93,7 @@ describe RuboCop::Cop::FormulaAudit::Text do
|
|||||||
|
|
||||||
def install
|
def install
|
||||||
system "xcodebuild", "foo", "bar"
|
system "xcodebuild", "foo", "bar"
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use \"xcodebuild *args\" instead of \"system 'xcodebuild', *args\"
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use "xcodebuild *args" instead of "system 'xcodebuild', *args"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -107,7 +107,7 @@ describe RuboCop::Cop::FormulaAudit::Text do
|
|||||||
|
|
||||||
def install
|
def install
|
||||||
system "xcodebuild", "foo", "bar"
|
system "xcodebuild", "foo", "bar"
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use \"xcodebuild *args\" instead of \"system 'xcodebuild', *args\"
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use "xcodebuild *args" instead of "system 'xcodebuild', *args"
|
||||||
end
|
end
|
||||||
|
|
||||||
def plist
|
def plist
|
||||||
@ -152,7 +152,7 @@ describe RuboCop::Cop::FormulaAudit::Text do
|
|||||||
|
|
||||||
def install
|
def install
|
||||||
Formula.factory(name)
|
Formula.factory(name)
|
||||||
^^^^^^^^^^^^^^^^^^^^^ \"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\"
|
^^^^^^^^^^^^^^^^^^^^^ "Formula.factory(name)" is deprecated in favor of "Formula[name]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -166,7 +166,7 @@ describe RuboCop::Cop::FormulaAudit::Text do
|
|||||||
|
|
||||||
def install
|
def install
|
||||||
system "dep", "ensure"
|
system "dep", "ensure"
|
||||||
^^^^^^^^^^^^^^^^^^^^^^ use \"dep\", \"ensure\", \"-vendor-only\"
|
^^^^^^^^^^^^^^^^^^^^^^ use "dep", "ensure", "-vendor-only"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
@ -180,7 +180,7 @@ describe RuboCop::Cop::FormulaAudit::Text do
|
|||||||
|
|
||||||
def install
|
def install
|
||||||
system "cargo", "build"
|
system "cargo", "build"
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^ use \"cargo\", \"install\", *std_cargo_args
|
^^^^^^^^^^^^^^^^^^^^^^^ use "cargo", "install", *std_cargo_args
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
@ -592,8 +592,8 @@ describe Homebrew::Service do
|
|||||||
StandardInput=file:#{HOMEBREW_PREFIX}/var/in/beanstalkd
|
StandardInput=file:#{HOMEBREW_PREFIX}/var/in/beanstalkd
|
||||||
StandardOutput=append:#{HOMEBREW_PREFIX}/var/log/beanstalkd.log
|
StandardOutput=append:#{HOMEBREW_PREFIX}/var/log/beanstalkd.log
|
||||||
StandardError=append:#{HOMEBREW_PREFIX}/var/log/beanstalkd.error.log
|
StandardError=append:#{HOMEBREW_PREFIX}/var/log/beanstalkd.error.log
|
||||||
Environment=\"PATH=#{std_path}\"
|
Environment="PATH=#{std_path}"
|
||||||
Environment=\"FOO=BAR\"
|
Environment="FOO=BAR"
|
||||||
EOS
|
EOS
|
||||||
expect(unit).to eq(unit_expect.strip)
|
expect(unit).to eq(unit_expect.strip)
|
||||||
end
|
end
|
||||||
|
@ -36,7 +36,7 @@ RSpec.shared_context "Homebrew Cask", :needs_macos do # rubocop:disable RSpec/Co
|
|||||||
third_party_tap = Tap.fetch("third-party", "tap")
|
third_party_tap = Tap.fetch("third-party", "tap")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Cask::Config::DEFAULT_DIRS_PATHNAMES.values.each(&:mkpath)
|
Cask::Config::DEFAULT_DIRS_PATHNAMES.each_value(&:mkpath)
|
||||||
|
|
||||||
Tap.default_cask_tap.tap do |tap|
|
Tap.default_cask_tap.tap do |tap|
|
||||||
FileUtils.mkdir_p tap.path.dirname
|
FileUtils.mkdir_p tap.path.dirname
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
describe Tty do
|
describe Tty do
|
||||||
describe "::strip_ansi" do
|
describe "::strip_ansi" do
|
||||||
it "removes ANSI escape codes from a string" do
|
it "removes ANSI escape codes from a string" do
|
||||||
expect(described_class.strip_ansi("\033\[36;7mhello\033\[0m")).to eq("hello")
|
expect(described_class.strip_ansi("\033[36;7mhello\033[0m")).to eq("hello")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -535,7 +535,7 @@ module GitHub
|
|||||||
response = create_fork(tap_remote_repo, org: org)
|
response = create_fork(tap_remote_repo, org: org)
|
||||||
# GitHub API responds immediately but fork takes a few seconds to be ready.
|
# GitHub API responds immediately but fork takes a few seconds to be ready.
|
||||||
sleep 1 until check_fork_exists(tap_remote_repo, org: org)
|
sleep 1 until check_fork_exists(tap_remote_repo, org: org)
|
||||||
remote_url = if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
|
remote_url = if system("git", "config", "--local", "--get-regexp", "remote..*.url", "git@github.com:.*")
|
||||||
response.fetch("ssh_url")
|
response.fetch("ssh_url")
|
||||||
else
|
else
|
||||||
url = response.fetch("clone_url")
|
url = response.fetch("clone_url")
|
||||||
|
@ -185,7 +185,10 @@ module GitHub
|
|||||||
# This is a no-op if the user is opting out of using the GitHub API.
|
# This is a no-op if the user is opting out of using the GitHub API.
|
||||||
return block_given? ? yield({}) : {} if Homebrew::EnvConfig.no_github_api?
|
return block_given? ? yield({}) : {} if Homebrew::EnvConfig.no_github_api?
|
||||||
|
|
||||||
args = ["--header", "Accept: application/vnd.github+json", "--write-out", "\n%\{http_code}"]
|
# This is a Curl format token, not a Ruby one.
|
||||||
|
# rubocop:disable Style/FormatStringToken
|
||||||
|
args = ["--header", "Accept: application/vnd.github+json", "--write-out", "\n%{http_code}"]
|
||||||
|
# rubocop:enable Style/FormatStringToken
|
||||||
|
|
||||||
token = credentials
|
token = credentials
|
||||||
args += ["--header", "Authorization: token #{token}"] unless credentials_type == :none
|
args += ["--header", "Authorization: token #{token}"] unless credentials_type == :none
|
||||||
|
@ -220,9 +220,9 @@ module PyPI
|
|||||||
pipgrip_output = Utils.popen_read(*command)
|
pipgrip_output = Utils.popen_read(*command)
|
||||||
unless $CHILD_STATUS.success?
|
unless $CHILD_STATUS.success?
|
||||||
odie <<~EOS
|
odie <<~EOS
|
||||||
Unable to determine dependencies for \"#{input_packages.join(" ")}\" because of a failure when running
|
Unable to determine dependencies for "#{input_packages.join(" ")}" because of a failure when running
|
||||||
`#{command.join(" ")}`.
|
`#{command.join(" ")}`.
|
||||||
Please update the resources for \"#{formula.name}\" manually.
|
Please update the resources for "#{formula.name}" manually.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -242,8 +242,8 @@ module PyPI
|
|||||||
odie "Unable to resolve some dependencies. Please update the resources for \"#{formula.name}\" manually."
|
odie "Unable to resolve some dependencies. Please update the resources for \"#{formula.name}\" manually."
|
||||||
elsif url.blank? || checksum.blank?
|
elsif url.blank? || checksum.blank?
|
||||||
odie <<~EOS
|
odie <<~EOS
|
||||||
Unable to find the URL and/or sha256 for the \"#{name}\" resource.
|
Unable to find the URL and/or sha256 for the "#{name}" resource.
|
||||||
Please update the resources for \"#{formula.name}\" manually.
|
Please update the resources for "#{formula.name}" manually.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
|||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.24.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.24.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.11.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.11.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.3.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.3.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.35.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.40.0/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.15.1/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.15.1/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.3/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.3/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.16.0/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-2.16.0/lib")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user