Class: RuboCop::Cop::Homebrew::OSDependsOn Private
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- rubocops/os_depends_on.rb
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.
Constant Summary collapse
- MACOS_ONLY_CASK_STANZAS =
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([ :app, :audio_unit_plugin, :colorpicker, :dictionary, :input_method, :internet_plugin, :keyboard_layout, :mdimporter, :pkg, :prefpane, :qlplugin, :screen_saver, :service, :suite, :vst_plugin, :vst3_plugin, ].freeze, T::Array[Symbol])
- CASK_STANZA_ORDER =
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(RuboCop::Cask::Constants::STANZA_ORDER, T::Array[Symbol])
- MACOS_DEPENDENCY_STANZAS =
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([:macos, :maximum_macos].freeze, T::Array[Symbol])
- 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.
[:depends_on].freeze
Instance Method Summary collapse
- #on_block(node) ⇒ void private
- #on_send(node) ⇒ void private
Instance Method Details
#on_block(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.
38 39 40 41 42 43 44 |
# File 'rubocops/os_depends_on.rb', line 38 def on_block(node) send_node = node.children.first return unless send_node.is_a?(RuboCop::AST::SendNode) return if send_node.method_name != :cask add_missing_macos_dependency(node) 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.
47 48 49 50 51 |
# File 'rubocops/os_depends_on.rb', line 47 def on_send(node) autocorrect_macos_comparison_strings(node) (node) check_conflicting_os_requirements(node) end |