brew style --fix
This commit is contained in:
parent
fb336da538
commit
b9b3bd2571
@ -55,7 +55,7 @@ module Homebrew
|
||||
ENV["HOMEBREW_LINUXBREW_CORE_MIGRATION"].blank?
|
||||
ohai "Re-running `brew update` for linuxbrew-core migration"
|
||||
|
||||
if HOMEBREW_CORE_DEFAULT_GIT_REMOTE != Homebrew::EnvConfig.core_git_remote
|
||||
if Homebrew::EnvConfig.core_git_remote != HOMEBREW_CORE_DEFAULT_GIT_REMOTE
|
||||
opoo <<~EOS
|
||||
HOMEBREW_CORE_GIT_REMOTE was set: #{Homebrew::EnvConfig.core_git_remote}.
|
||||
It has been unset for the migration.
|
||||
@ -65,7 +65,7 @@ module Homebrew
|
||||
end
|
||||
ENV.delete("HOMEBREW_CORE_GIT_REMOTE")
|
||||
|
||||
if HOMEBREW_BOTTLE_DEFAULT_DOMAIN != Homebrew::EnvConfig.bottle_domain
|
||||
if Homebrew::EnvConfig.bottle_domain != HOMEBREW_BOTTLE_DEFAULT_DOMAIN
|
||||
opoo <<~EOS
|
||||
HOMEBREW_BOTTLE_DOMAIN was set: #{Homebrew::EnvConfig.bottle_domain}.
|
||||
It has been unset for the migration.
|
||||
|
||||
@ -51,7 +51,7 @@ describe RuboCop::Cop::Homebrew::IORead do
|
||||
end
|
||||
|
||||
it "reports an offense when `IO.read` is used with a concatenated string starting with a pipe character" do
|
||||
expect_offense(<<~'RUBY')
|
||||
expect_offense(<<~RUBY)
|
||||
input = "|echo test"
|
||||
IO.read("|echo " + input)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk.
|
||||
@ -59,7 +59,7 @@ describe RuboCop::Cop::Homebrew::IORead do
|
||||
end
|
||||
|
||||
it "reports an offense when `IO.read` is used with a concatenated string starting with untrustworthy input" do
|
||||
expect_offense(<<~'RUBY')
|
||||
expect_offense(<<~RUBY)
|
||||
input = "|echo test"
|
||||
IO.read(input + ".txt")
|
||||
^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk.
|
||||
@ -67,7 +67,7 @@ describe RuboCop::Cop::Homebrew::IORead do
|
||||
end
|
||||
|
||||
it "does not report an offense when `IO.read` is used with a concatenated string safely" do
|
||||
expect_no_offenses(<<~'RUBY')
|
||||
expect_no_offenses(<<~RUBY)
|
||||
input = "test"
|
||||
IO.read("somefile" + input + ".txt")
|
||||
RUBY
|
||||
|
||||
@ -24,7 +24,7 @@ describe Homebrew::Style do
|
||||
it "returns offenses when RuboCop reports offenses" do
|
||||
formula = dir/"my-formula.rb"
|
||||
|
||||
formula.write <<~'EOS'
|
||||
formula.write <<~EOS
|
||||
class MyFormula < Formula
|
||||
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user