diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 9e10a195fd..cacc2afe4c 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -9,7 +9,7 @@ require "livecheck/livecheck" require "source_location" require "system_command" require "utils/backtrace" -require "token_auditor" +require "formula_name_cask_token_auditor" require "utils/curl" require "utils/git" require "utils/shared_audits" @@ -395,7 +395,7 @@ module Cask sig { void } def audit_token - token_auditor = Homebrew::TokenAuditor.new(cask.token) + token_auditor = Homebrew::FormulaNameCaskTokenAuditor.new(cask.token) return if (errors = token_auditor.errors).empty? add_error "Cask token '#{cask.token}' must not contain #{errors.to_sentence(two_words_connector: " or ", diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 70350d59c4..4c2aa07401 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -3,7 +3,7 @@ require "deprecate_disable" require "formula_versions" -require "token_auditor" +require "formula_name_cask_token_auditor" require "resource_auditor" require "utils/shared_audits" @@ -164,8 +164,8 @@ module Homebrew def audit_name name = formula.name - token_auditor = Homebrew::TokenAuditor.new(name) - unless (errors = token_auditor.errors).empty? + name_auditor = Homebrew::FormulaNameCaskTokenAuditor.new(name) + unless (errors = name_auditor.errors).empty? problem "Formula name '#{name}' must not contain #{errors.to_sentence(two_words_connector: " or ", last_word_connector: " or ")}." end diff --git a/Library/Homebrew/token_auditor.rb b/Library/Homebrew/formula_name_cask_token_auditor.rb similarity index 96% rename from Library/Homebrew/token_auditor.rb rename to Library/Homebrew/formula_name_cask_token_auditor.rb index 11ad69388b..78b708b567 100644 --- a/Library/Homebrew/token_auditor.rb +++ b/Library/Homebrew/formula_name_cask_token_auditor.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true module Homebrew - class TokenAuditor + class FormulaNameCaskTokenAuditor sig { returns(String) } attr_reader :token