Class: RuboCop::Cop::SketchupRequirements::DebugMode

Inherits:
SketchUp::Cop show all
Defined in:
lib/rubocop/sketchup/cop/requirements/debug_mode.rb

Overview

Changing the global SketchUp debug mode can cause warnings from other extensions to be silenced. Don’t let your extension change the debug mode in a production setting.

Constant Summary collapse

MSG_SET_NAME =
'Changing `Sketchup.debug_mode=` may hide warnings ' \
'other extension developers rely on.'

Constants inherited from SketchUp::Cop

SketchUp::Cop::SKETCHUP_DEPARTMENT_SEVERITY

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



18
19
20
21
22
# File 'lib/rubocop/sketchup/cop/requirements/debug_mode.rb', line 18

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

  add_offense(node, message: MSG_SET_NAME)
end