From 7ddc185b35260791e0cd21319f39f6202b7041ed Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Mon, 19 Aug 2019 14:27:29 +1000 Subject: [PATCH] Fix various typos --- Library/Homebrew/build.rb | 2 +- Library/Homebrew/cmd/missing.rb | 2 +- Library/Homebrew/formulary.rb | 2 +- Library/Homebrew/os/mac/version.rb | 2 +- Library/Homebrew/rubocops/components_order.rb | 2 +- Library/Homebrew/shims/super/cc | 2 +- Library/Homebrew/test/ENV_spec.rb | 4 ++-- Library/Homebrew/test/cask/cask_spec.rb | 2 +- Library/Homebrew/test/cask/cmd/edit_spec.rb | 2 +- Library/Homebrew/test/cask/cmd/outdated_spec.rb | 2 +- Library/Homebrew/test/formula_validation_spec.rb | 2 +- Library/Homebrew/test/inreplace_spec.rb | 4 ++-- Library/Homebrew/test/resource_spec.rb | 2 +- Library/Homebrew/test/tab_spec.rb | 4 ++-- Library/Homebrew/version/null.rb | 2 +- completions/fish/brew.fish | 6 +++--- completions/zsh/_brew | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 7e62852204..fb846784fa 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -197,7 +197,7 @@ rescue Exception => e # rubocop:disable Lint/RescueException # Special case: need to recreate BuildErrors in full # for proper analytics reporting and error messages. - # BuildErrors are specific to build processses and not other + # BuildErrors are specific to build processes and not other # children, which is why we create the necessary state here # and not in Utils.safe_fork. if error_hash["json_class"] == "BuildError" diff --git a/Library/Homebrew/cmd/missing.rb b/Library/Homebrew/cmd/missing.rb index a8889e5ed2..532ac55c24 100644 --- a/Library/Homebrew/cmd/missing.rb +++ b/Library/Homebrew/cmd/missing.rb @@ -11,7 +11,7 @@ module Homebrew def missing_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `missing` [] [] + `missing` [] [] Check the given for missing dependencies. If no are given, check all installed brews. diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 307e8e2b50..57fcd69773 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -71,7 +71,7 @@ module Formulary # instead have found the new formula.) # # Because of this, the user is referring to this specific formula, - # not any formula targetted by the same alias, so in this context + # not any formula targeted by the same alias, so in this context # the formula shouldn't be considered outdated if the alias used to # install it has changed. f.follow_installed_alias = false diff --git a/Library/Homebrew/os/mac/version.rb b/Library/Homebrew/os/mac/version.rb index 962b88fa73..07a2bb0c54 100644 --- a/Library/Homebrew/os/mac/version.rb +++ b/Library/Homebrew/os/mac/version.rb @@ -42,7 +42,7 @@ module OS to_sym.to_s.split("_").map(&:capitalize).join(" ") end - # For OS::Mac::Version compatability + # For OS::Mac::Version compatibility def requires_nehalem_cpu? Hardware.oldest_cpu(self) == :nehalem end diff --git a/Library/Homebrew/rubocops/components_order.rb b/Library/Homebrew/rubocops/components_order.rb index 709f0fa1bf..08c48224f1 100644 --- a/Library/Homebrew/rubocops/components_order.rb +++ b/Library/Homebrew/rubocops/components_order.rb @@ -115,7 +115,7 @@ module RuboCop corrector.insert_after(node2.source_range, line_breaks + indentation + node1.source) else indentation = " " * (start_column(node2) - line_start_column(node2)) - # No line breaks upto version_scheme, order_idx == 8 + # No line breaks up to version_scheme, order_idx == 8 line_breaks = (order_idx > 8) ? "\n\n" : "\n" corrector.insert_before(node2.source_range, node1.source + line_breaks + indentation) end diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc index f50dde4447..4a82cf33d7 100755 --- a/Library/Homebrew/shims/super/cc +++ b/Library/Homebrew/shims/super/cc @@ -381,7 +381,7 @@ class Cmd paths.map! { |path| prefix + path } end - # Unlike path_flags, do not prune non-existant directories. + # Unlike path_flags, do not prune non-existent directories. # formula.lib for example does not yet exist, but should not be pruned. def rpath_flags(prefix, paths) paths.uniq.map { |path| prefix + path } diff --git a/Library/Homebrew/test/ENV_spec.rb b/Library/Homebrew/test/ENV_spec.rb index e7bac787fa..27b1258e0a 100644 --- a/Library/Homebrew/test/ENV_spec.rb +++ b/Library/Homebrew/test/ENV_spec.rb @@ -67,7 +67,7 @@ shared_examples EnvActivation do expect(subject["foo"]).to eq("1") end - it "appends to a non-existant key" do + it "appends to a non-existent key" do subject.append "foo", "1" expect(subject["foo"]).to eq("1") end @@ -93,7 +93,7 @@ shared_examples EnvActivation do expect(subject["foo"]).to eq("1") end - it "prepends to a non-existant key" do + it "prepends to a non-existent key" do subject.prepend "foo", "1" expect(subject["foo"]).to eq("1") end diff --git a/Library/Homebrew/test/cask/cask_spec.rb b/Library/Homebrew/test/cask/cask_spec.rb index 1bbe024a5b..791c74254c 100644 --- a/Library/Homebrew/test/cask/cask_spec.rb +++ b/Library/Homebrew/test/cask/cask_spec.rb @@ -185,7 +185,7 @@ describe Cask::Cask, :cask do end context "when it is from no known tap" do - it "retuns the cask token" do + it "returns the cask token" do file = Tempfile.new(%w[tapless-cask .rb]) begin diff --git a/Library/Homebrew/test/cask/cmd/edit_spec.rb b/Library/Homebrew/test/cask/cmd/edit_spec.rb index 58f4d21e4f..676debf587 100644 --- a/Library/Homebrew/test/cask/cmd/edit_spec.rb +++ b/Library/Homebrew/test/cask/cmd/edit_spec.rb @@ -23,7 +23,7 @@ describe Cask::Cmd::Edit, :cask do }.to raise_error(/Only one Cask can be edited at a time\./) end - it "raises an exception when the Cask doesnt exist" do + it "raises an exception when the Cask doesn't exist" do expect { described_class.run("notacask") }.to raise_error(Cask::CaskUnavailableError) diff --git a/Library/Homebrew/test/cask/cmd/outdated_spec.rb b/Library/Homebrew/test/cask/cmd/outdated_spec.rb index 57763d1deb..6cdf88014e 100644 --- a/Library/Homebrew/test/cask/cmd/outdated_spec.rb +++ b/Library/Homebrew/test/cask/cmd/outdated_spec.rb @@ -21,7 +21,7 @@ describe Cask::Cmd::Outdated, :cask do it_behaves_like "a command that handles invalid options" - describe 'without --greedy it ignores the Casks with "vesion latest" or "auto_updates true"' do + describe 'without --greedy it ignores the Casks with "version latest" or "auto_updates true"' do it "checks all the installed Casks when no token is provided" do expect { described_class.run diff --git a/Library/Homebrew/test/formula_validation_spec.rb b/Library/Homebrew/test/formula_validation_spec.rb index 53c679e8dc..0bf4a19523 100644 --- a/Library/Homebrew/test/formula_validation_spec.rb +++ b/Library/Homebrew/test/formula_validation_spec.rb @@ -21,7 +21,7 @@ describe Formula do end end - it "cant override the `brew` method" do + it "can't override the `brew` method" do expect { formula do def brew; end diff --git a/Library/Homebrew/test/inreplace_spec.rb b/Library/Homebrew/test/inreplace_spec.rb index 2491c8b870..55edc5437e 100644 --- a/Library/Homebrew/test/inreplace_spec.rb +++ b/Library/Homebrew/test/inreplace_spec.rb @@ -199,7 +199,7 @@ describe StringInreplaceExtension do describe "#sub!" do let(:string) { "foo" } - it "replaces the first occurence" do + it "replaces the first occurrence" do subject.sub!("o", "e") expect(subject).to eq("feo") end @@ -208,7 +208,7 @@ describe StringInreplaceExtension do describe "#gsub!" do let(:string) { "foo" } - it "replaces the all occurences" do + it "replaces all occurrences" do subject.gsub!("o", "e") # rubocop:disable Performance/StringReplacement expect(subject).to eq("fee") end diff --git a/Library/Homebrew/test/resource_spec.rb b/Library/Homebrew/test/resource_spec.rb index fde2eacaca..ec21741f08 100644 --- a/Library/Homebrew/test/resource_spec.rb +++ b/Library/Homebrew/test/resource_spec.rb @@ -38,7 +38,7 @@ describe Resource do expect(subject.download_strategy).to eq(GitDownloadStrategy) end - it "raises an error if the download strategy class is unkown" do + it "raises an error if the download strategy class is unknown" do expect { subject.url("foo", using: Class.new) }.to raise_error(TypeError) end diff --git a/Library/Homebrew/test/tab_spec.rb b/Library/Homebrew/test/tab_spec.rb index bcb233ef2a..cd9f3c9fd9 100644 --- a/Library/Homebrew/test/tab_spec.rb +++ b/Library/Homebrew/test/tab_spec.rb @@ -307,7 +307,7 @@ describe Tab do expect(subject.tabfile).to eq(f_tab_path) end - it "can create a Tab for a non-existant Keg" do + it "can create a Tab for a non-existent Keg" do f.prefix.mkpath expect(subject.tabfile).to eq(f_tab_path) @@ -336,7 +336,7 @@ describe Tab do expect(tab.tabfile).to eq(f_tab_path) end - it "can create a Tab for a non-existant Formula" do + it "can create a Tab for a non-existent Formula" do f.prefix.mkpath tab = described_class.for_formula(f) diff --git a/Library/Homebrew/version/null.rb b/Library/Homebrew/version/null.rb index c8731b0a03..075c148087 100644 --- a/Library/Homebrew/version/null.rb +++ b/Library/Homebrew/version/null.rb @@ -28,7 +28,7 @@ class Version true end - # For OS::Mac::Version compatability + # For OS::Mac::Version compatibility def requires_nehalem_cpu? false end diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index f05b68be62..9813126357 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -25,7 +25,7 @@ function __fish_brew_opts -d "Only arguments starting with a dash (options)" string match --all -- '-*' (__fish_brew_args) end -# This can be used either to get the first argument or to match it against a given list of commmands +# This can be used either to get the first argument or to match it against a given list of commands # # Usage examples (for `completion -n '...'`): # * `__fish_brew_command` returns the command (first arg of brew) or exits with 1 @@ -59,7 +59,7 @@ function __fish_brew_subcommand -a cmd -d "Helps matching the second argument of end end -# This can be used to match any given options agains the given list of arguments: +# This can be used to match any given option against the given list of arguments: # * to add condition on interdependent options # * to ddd condition on mutually exclusive options # @@ -390,7 +390,7 @@ __fish_brew_complete_arg 'install upgrade' -l keep-tmp -d "Keep temp fi __fish_brew_complete_arg 'install upgrade' -l build-bottle -d "Prepare the formula for eventual bottling during installation" __fish_brew_complete_arg 'install upgrade' -s i -l interactive -d "Download and patch formula, then open a shell" __fish_brew_complete_arg 'install upgrade; and __fish_brew_opt -i --interactive' -s g -l git -d "Create a Git repository for working on patches" -# fomrula installtion options are listed after the formula name: +# formula installation options are listed after the formula name: __fish_brew_complete_arg 'install; and [ (count (__fish_brew_args)) -ge 2 ]; and not string match --quiet -- "-*" (__fish_brew_args)[-1] diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 2f3900736c..dcf04af4b1 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -219,7 +219,7 @@ _brew_audit() { _arguments \ '(--new-formula)--strict[run additional checks including RuboCop style checks]' \ '(--new-formula)--online[run slower checks that require a network connection]' \ - '(--online --strict)--new-formula[check if a new formula is eligable for Homebrew. Implies --strict and --online]' \ + '(--online --strict)--new-formula[check if a new formula is eligible for Homebrew. Implies --strict and --online]' \ '--display-cop-names[include RuboCop cop name for each violation in the output]' \ '--display-filename[prefix every line of output with the name of the file or formula being audited]' \ '*:formula:__brew_formulae'