Class: RuboCop::Cop::Homebrew::MoveToExtendOS Private

Inherits:
Base
  • Object
show all
Defined in:
rubocops/move_to_extend_os.rb,
sorbet/rbi/dsl/rubo_cop/cop/homebrew/move_to_extend_os.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.

This cop ensures that platform specific code ends up in extend/os.

Constant Summary collapse

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.

"Move `OS.linux?` and `OS.mac?` calls to `extend/os`."

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object

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.



15
16
17
18
19
# File 'rubocops/move_to_extend_os.rb', line 15

def on_send(node)
  return unless os_check?(node)

  add_offense(node)
end

#os_check?(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.

Parameters:

Returns:

  • (T.untyped)


10
# File 'sorbet/rbi/dsl/rubo_cop/cop/homebrew/move_to_extend_os.rbi', line 10

def os_check?(node, **kwargs, &block); end