Class: RuboCop::Cop::SketchupRequirements::GlobalInclude
- Inherits:
-
SketchUp::Cop
- Object
- SketchUp::WorkaroundCop
- SketchUp::Cop
- RuboCop::Cop::SketchupRequirements::GlobalInclude
- Includes:
- SketchUp, SketchUp::NoCommentDisable
- Defined in:
- lib/rubocop/sketchup/cop/requirements/global_include.rb
Overview
Extensions in SketchUp all share the same Ruby environment on the user’s machine. Because of this it’s important that each extension isolate itself to avoid clashing with other extensions.
Extensions submitted to Extension Warehouse is expected to not pollute the global namespace by including mix-in modules.
Constant Summary collapse
- MSG =
'Do not include into global namespace.'
Constants included from SketchUp
SketchUp::CONFIG, SketchUp::VERSION
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
Instance Method Details
#on_send(node) ⇒ Object
23 24 25 26 27 |
# File 'lib/rubocop/sketchup/cop/requirements/global_include.rb', line 23 def on_send(node) return unless global_include?(node) add_offense(node, location: :selector) end |