Class: RuboCop::Cop::SketchupDeprecations::OperationNextTransparent

Inherits:
SketchUp::Cop
  • Object
show all
Defined in:
lib/rubocop/sketchup/cop/deprecations/operation_next_transparent.rb

Overview

Weak warning. (Question?)

Constant Summary collapse

MSG =
'Third argument is deprecated.'.freeze

Constants included from SketchUp::Config

SketchUp::Config::DEFAULT_CONFIGURATION

Instance Method Summary collapse

Methods inherited from SketchUp::Cop

inherited, #relevant_file?

Instance Method Details

#on_send(node) ⇒ Object


10
11
12
13
14
15
16
17
# File 'lib/rubocop/sketchup/cop/deprecations/operation_next_transparent.rb', line 10

def on_send(node)
  _, method_name, *args = *node
  return unless method_name == :start_operation
  return if args.size < 3
  argument = args[2]
  next_transparent = argument.type == :true
  add_offense(argument, location: :expression) if next_transparent
end