mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
use single quotes around stanza and parameter names
This commit is contained in:
parent
2ed324ebc0
commit
99ad3350ee
@ -416,7 +416,7 @@ module Cask
|
||||
return unless verified_matches_url?
|
||||
|
||||
add_error "The URL's domain #{domain} matches the homepage domain #{homepage}, " \
|
||||
"the `verified` parameter of the `url` stanza is unnecessary. " \
|
||||
"the 'verified' parameter of the 'url' stanza is unnecessary. " \
|
||||
"See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-verified"
|
||||
end
|
||||
|
||||
@ -427,7 +427,7 @@ module Cask
|
||||
return if verified_present?
|
||||
|
||||
add_error "The URL's domain #{domain} does not match the homepage domain #{homepage}, " \
|
||||
"a `verified` parameter has to be added to the `url` stanza. " \
|
||||
"a 'verified' parameter has to be added to the 'url' stanza. " \
|
||||
"See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-verified"
|
||||
end
|
||||
|
||||
|
@ -101,7 +101,7 @@ module Cask
|
||||
return false if outdated_casks.empty?
|
||||
|
||||
if casks.empty? && !greedy
|
||||
ohai "Casks with `auto_updates` or `version :latest` will not be upgraded; pass `--greedy` to upgrade them."
|
||||
ohai "Casks with 'auto_updates' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them."
|
||||
end
|
||||
|
||||
verb = dry_run ? "Would upgrade" : "Upgrading"
|
||||
|
@ -384,8 +384,8 @@ class FormulaUnknownPythonError < RuntimeError
|
||||
The version of Python to use with the virtualenv in the `#{formula.full_name}` formula
|
||||
cannot be guessed automatically because a recognised Python dependency could not be found.
|
||||
|
||||
If you are using a non-standard Python depedency, please add `:using => "python@x.y"` to
|
||||
`virtualenv_install_with_resources` to resolve the issue manually.
|
||||
If you are using a non-standard Python dependency, please add `:using => "python@x.y"`
|
||||
to 'virtualenv_install_with_resources' to resolve the issue manually.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
@ -394,10 +394,11 @@ end
|
||||
class FormulaAmbiguousPythonError < RuntimeError
|
||||
def initialize(formula)
|
||||
super <<~EOS
|
||||
The version of python to use with the virtualenv in the `#{formula.full_name}` formula
|
||||
cannot be guessed automatically. If the simultaneous use of multiple pythons
|
||||
is intentional, please add `:using => "python@x.y"` to
|
||||
`virtualenv_install_with_resources` to resolve the ambiguity manually.
|
||||
The version of Python to use with the virtualenv in the `#{formula.full_name}` formula
|
||||
cannot be guessed automatically.
|
||||
|
||||
If the simultaneous use of multiple Pythons is intentional, please add `:using => "python@x.y"`
|
||||
to 'virtualenv_install_with_resources' to resolve the ambiguity manually.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
@ -7,7 +7,7 @@ module OnOS
|
||||
# # Do something Mac-specific
|
||||
# end</pre>
|
||||
def on_macos(&block)
|
||||
raise "No block content defined for on_macos block" unless block
|
||||
raise "No block content defined for 'on_macos' block" unless block
|
||||
end
|
||||
|
||||
# Block only executed on Linux. No-op on macOS.
|
||||
@ -15,7 +15,7 @@ module OnOS
|
||||
# # Do something Linux-specific
|
||||
# end</pre>
|
||||
def on_linux(&block)
|
||||
raise "No block content defined for on_linux block" unless block
|
||||
raise "No block content defined for 'on_linux' block" unless block
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
module OnOS
|
||||
def on_linux(&block)
|
||||
raise "No block content defined for on_linux block" unless block
|
||||
raise "No block content defined for 'on_linux' block" unless block
|
||||
|
||||
yield
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
module OnOS
|
||||
def on_macos(&block)
|
||||
raise "No block content defined for on_macos block" unless block
|
||||
raise "No block content defined for 'on_macos' block" unless block
|
||||
|
||||
yield
|
||||
end
|
||||
|
@ -221,13 +221,13 @@ module Homebrew
|
||||
# Don't complain about missing cross-tap dependencies
|
||||
next
|
||||
rescue FormulaUnavailableError
|
||||
problem "Can't find dependency #{dep.name.inspect}."
|
||||
problem "Can't find dependency '#{dep.name.inspect}'."
|
||||
next
|
||||
rescue TapFormulaAmbiguityError
|
||||
problem "Ambiguous dependency #{dep.name.inspect}."
|
||||
problem "Ambiguous dependency '#{dep.name.inspect}'."
|
||||
next
|
||||
rescue TapFormulaWithOldnameAmbiguityError
|
||||
problem "Ambiguous oldname dependency #{dep.name.inspect}."
|
||||
problem "Ambiguous oldname dependency '#{dep.name.inspect}'."
|
||||
next
|
||||
end
|
||||
|
||||
@ -258,10 +258,10 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
problem "Dependency #{dep} does not define option #{opt.name.inspect}"
|
||||
problem "Dependency '#{dep}' does not define option #{opt.name.inspect}"
|
||||
end
|
||||
|
||||
problem "Don't use git as a dependency (it's always available)" if @new_formula && dep.name == "git"
|
||||
problem "Don't use 'git' as a dependency (it's always available)" if @new_formula && dep.name == "git"
|
||||
|
||||
problem "Dependency '#{dep.name}' is marked as :run. Remove :run; it is a no-op." if dep.tags.include?(:run)
|
||||
|
||||
|
@ -806,7 +806,7 @@ class FormulaInstaller
|
||||
fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation?
|
||||
|
||||
if build_bottle?
|
||||
ohai "Not running post_install as we're building a bottle"
|
||||
ohai "Not running 'post_install' as we're building a bottle"
|
||||
puts "You can run it manually using:"
|
||||
puts " brew postinstall #{formula.full_name}"
|
||||
else
|
||||
|
@ -356,7 +356,7 @@ class BottleSpecification
|
||||
if [HOMEBREW_DEFAULT_PREFIX,
|
||||
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX,
|
||||
HOMEBREW_LINUX_DEFAULT_PREFIX].exclude?(prefix)
|
||||
odeprecated "setting `prefix` for bottles"
|
||||
odeprecated "setting 'prefix' for bottles"
|
||||
end
|
||||
@prefix = prefix
|
||||
end
|
||||
|
@ -917,7 +917,7 @@ describe Cask::Audit, :cask do
|
||||
RUBY
|
||||
end
|
||||
|
||||
it { is_expected.to fail_with(/a `verified` parameter has to be added/) }
|
||||
it { is_expected.to fail_with(/a 'verified' parameter has to be added/) }
|
||||
end
|
||||
|
||||
context "when the url does not match the homepage with verified" do
|
||||
|
@ -117,7 +117,7 @@ module Utils
|
||||
sig { params(name: Symbol, replacement: T.any(Numeric, String, Symbol), type: T.nilable(Symbol)).void }
|
||||
def replace_stanza(name, replacement, type: nil)
|
||||
stanza_node = stanza(name, type: type)
|
||||
raise "Could not find `#{name}` stanza!" if stanza_node.blank?
|
||||
raise "Could not find '#{name}' stanza!" if stanza_node.blank?
|
||||
|
||||
tree_rewriter.replace(stanza_node.source_range, stanza_text(name, replacement, indent: 2).lstrip)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user