Class: RuboCop::Cop::Homebrew::FormulaPathMethods Private
- Extended by:
- AutoCorrector
- Defined in:
- rubocops/formula_path_methods.rb,
sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Checks for formula instances created only to build stable opt paths.
Constant Summary collapse
- FORMULA_OPT_HELPERS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.let({ opt_bin: "formula_opt_bin", opt_lib: "formula_opt_lib", opt_libexec: "formula_opt_libexec", opt_include: "formula_opt_include", opt_prefix: "formula_opt_prefix", }.freeze, T::Hash[Symbol, String])
- SCOPED_FORMULA_HELPERS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
[ :formula_any_version_installed?, :formula_opt_bin, :formula_opt_include, :formula_opt_lib, :formula_opt_libexec, :formula_opt_prefix, ].freeze
- MSG =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"Use `%<preferred>s` instead of `%<current>s`."- RESTRICT_ON_SEND =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.let([ :any_version_installed?, :installed?, :installed_version, :opt_bin, :opt_include, :opt_lib, :opt_libexec, :opt_prefix, *SCOPED_FORMULA_HELPERS, ].freeze, T::Array[Symbol])
Instance Method Summary collapse
- #cask_block?(node, **kwargs, &block) ⇒ T.untyped private
- #cask_new_token_node(node, **kwargs, &block) ⇒ T.untyped private
- #formula_class?(node, **kwargs, &block) ⇒ T.untyped private
- #formula_lookup_name_node(node, **kwargs, &block) ⇒ T.untyped private
- #formula_path_name_node(node, **kwargs, &block) ⇒ T.untyped private
- #on_send(node) ⇒ void private
- #service_block?(node, **kwargs, &block) ⇒ T.untyped private
- #utils_path?(node, **kwargs, &block) ⇒ T.untyped private
Instance Method Details
#cask_block?(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
10 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 10 def cask_block?(node, **kwargs, &block); end |
#cask_new_token_node(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
13 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 13 def cask_new_token_node(node, **kwargs, &block); end |
#formula_class?(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
16 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 16 def formula_class?(node, **kwargs, &block); end |
#formula_lookup_name_node(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
19 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 19 def formula_lookup_name_node(node, **kwargs, &block); end |
#formula_path_name_node(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
22 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 22 def formula_path_name_node(node, **kwargs, &block); end |
#on_send(node) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
72 73 74 75 76 77 78 79 |
# File 'rubocops/formula_path_methods.rb', line 72 def on_send(node) preferred = preferred_method_call(node) return unless preferred add_offense(node, message: format(MSG, preferred:, current: node.source)) do |corrector| corrector.replace(node.loc.expression, preferred) end end |
#service_block?(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
25 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 25 def service_block?(node, **kwargs, &block); end |
#utils_path?(node, **kwargs, &block) ⇒ T.untyped
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
28 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/formula_path_methods.rbi', line 28 def utils_path?(node, **kwargs, &block); end |