Skip to content
Snippets Groups Projects
Commit 99ad3350 authored by EricFromCanada's avatar EricFromCanada
Browse files

use single quotes around stanza and parameter names

parent 2ed324eb
No related branches found
No related tags found
No related merge requests found
...@@ -416,7 +416,7 @@ module Cask ...@@ -416,7 +416,7 @@ module Cask
return unless verified_matches_url? return unless verified_matches_url?
add_error "The URL's domain #{domain} matches the homepage domain #{homepage}, " \ 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" "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 end
...@@ -427,7 +427,7 @@ module Cask ...@@ -427,7 +427,7 @@ module Cask
return if verified_present? return if verified_present?
add_error "The URL's domain #{domain} does not match the homepage domain #{homepage}, " \ 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" "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 end
......
...@@ -101,7 +101,7 @@ module Cask ...@@ -101,7 +101,7 @@ module Cask
return false if outdated_casks.empty? return false if outdated_casks.empty?
if casks.empty? && !greedy 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 end
verb = dry_run ? "Would upgrade" : "Upgrading" verb = dry_run ? "Would upgrade" : "Upgrading"
......
...@@ -384,8 +384,8 @@ class FormulaUnknownPythonError < RuntimeError ...@@ -384,8 +384,8 @@ class FormulaUnknownPythonError < RuntimeError
The version of Python to use with the virtualenv in the `#{formula.full_name}` formula 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. 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 If you are using a non-standard Python dependency, please add `:using => "python@x.y"`
`virtualenv_install_with_resources` to resolve the issue manually. to 'virtualenv_install_with_resources' to resolve the issue manually.
EOS EOS
end end
end end
...@@ -394,10 +394,11 @@ end ...@@ -394,10 +394,11 @@ end
class FormulaAmbiguousPythonError < RuntimeError class FormulaAmbiguousPythonError < RuntimeError
def initialize(formula) def initialize(formula)
super <<~EOS super <<~EOS
The version of python to use with the virtualenv in the `#{formula.full_name}` formula 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 cannot be guessed automatically.
is intentional, please add `:using => "python@x.y"` to
`virtualenv_install_with_resources` to resolve the ambiguity manually. 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 EOS
end end
end end
......
...@@ -7,7 +7,7 @@ module OnOS ...@@ -7,7 +7,7 @@ module OnOS
# # Do something Mac-specific # # Do something Mac-specific
# end</pre> # end</pre>
def on_macos(&block) 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 end
# Block only executed on Linux. No-op on macOS. # Block only executed on Linux. No-op on macOS.
...@@ -15,7 +15,7 @@ module OnOS ...@@ -15,7 +15,7 @@ module OnOS
# # Do something Linux-specific # # Do something Linux-specific
# end</pre> # end</pre>
def on_linux(&block) 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
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module OnOS module OnOS
def on_linux(&block) 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 yield
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module OnOS module OnOS
def on_macos(&block) 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 yield
end end
......
...@@ -221,13 +221,13 @@ module Homebrew ...@@ -221,13 +221,13 @@ module Homebrew
# Don't complain about missing cross-tap dependencies # Don't complain about missing cross-tap dependencies
next next
rescue FormulaUnavailableError rescue FormulaUnavailableError
problem "Can't find dependency #{dep.name.inspect}." problem "Can't find dependency '#{dep.name.inspect}'."
next next
rescue TapFormulaAmbiguityError rescue TapFormulaAmbiguityError
problem "Ambiguous dependency #{dep.name.inspect}." problem "Ambiguous dependency '#{dep.name.inspect}'."
next next
rescue TapFormulaWithOldnameAmbiguityError rescue TapFormulaWithOldnameAmbiguityError
problem "Ambiguous oldname dependency #{dep.name.inspect}." problem "Ambiguous oldname dependency '#{dep.name.inspect}'."
next next
end end
...@@ -258,10 +258,10 @@ module Homebrew ...@@ -258,10 +258,10 @@ module Homebrew
end end
end end
problem "Dependency #{dep} does not define option #{opt.name.inspect}" problem "Dependency '#{dep}' does not define option #{opt.name.inspect}"
end 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) 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 ...@@ -806,7 +806,7 @@ class FormulaInstaller
fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation? fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation?
if build_bottle? 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 "You can run it manually using:"
puts " brew postinstall #{formula.full_name}" puts " brew postinstall #{formula.full_name}"
else else
......
...@@ -356,7 +356,7 @@ class BottleSpecification ...@@ -356,7 +356,7 @@ class BottleSpecification
if [HOMEBREW_DEFAULT_PREFIX, if [HOMEBREW_DEFAULT_PREFIX,
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX, HOMEBREW_MACOS_ARM_DEFAULT_PREFIX,
HOMEBREW_LINUX_DEFAULT_PREFIX].exclude?(prefix) HOMEBREW_LINUX_DEFAULT_PREFIX].exclude?(prefix)
odeprecated "setting `prefix` for bottles" odeprecated "setting 'prefix' for bottles"
end end
@prefix = prefix @prefix = prefix
end end
......
...@@ -917,7 +917,7 @@ describe Cask::Audit, :cask do ...@@ -917,7 +917,7 @@ describe Cask::Audit, :cask do
RUBY RUBY
end 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 end
context "when the url does not match the homepage with verified" do context "when the url does not match the homepage with verified" do
......
...@@ -117,7 +117,7 @@ module Utils ...@@ -117,7 +117,7 @@ module Utils
sig { params(name: Symbol, replacement: T.any(Numeric, String, Symbol), type: T.nilable(Symbol)).void } sig { params(name: Symbol, replacement: T.any(Numeric, String, Symbol), type: T.nilable(Symbol)).void }
def replace_stanza(name, replacement, type: nil) def replace_stanza(name, replacement, type: nil)
stanza_node = stanza(name, type: type) 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) tree_rewriter.replace(stanza_node.source_range, stanza_text(name, replacement, indent: 2).lstrip)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment