Class: RuboCop::Cop::SketchupRequirements::ShippedExtensionsNamespace

Inherits:
SketchUp::Cop
  • Object
show all
Includes:
SketchUp::NamespaceChecker, SketchUp::NoCommentDisable
Defined in:
lib/rubocop/sketchup/cop/requirements/shipped_extensions_namespace.rb

Overview

Don’t modify SketchUp’s shipped extensions.

Constant Summary collapse

MSG =
'Do not modify shipped extensions.'
NAMESPACES_ADVANCED_CAMERA_TOOLS =

We check only against the top level namespaces. The core define more objects, but they are under one of the top level namespaces listed.

%w[
  ACTUtil
  CameraAppObserver
  CameraEntityObserver
  CameraFrameChangeObserver
  CameraRep
  CameraToolModelObserver
  CameraToolPagesObserver
  CameraToolViewObserver
  FilmCameraTool
  FSCameraData
  FSGeomUtils
  FSValidate
  PageNameChangeObserver
].freeze
NAMESPACES_DYNAMIC_COMPONENTS =
%w[
  DCConverter
  DCDownloader
  DCFunctionsV1
  DCInteractTool
  DCObservers
  DCProgressBar
  DynamicComponents
  DynamicComponentsV1
].freeze
NAMESPACES_TRIMBLE_CONNECT =
%w[
  Trimble
].freeze
NAMESPACES =
(
  NAMESPACES_ADVANCED_CAMERA_TOOLS |
  NAMESPACES_DYNAMIC_COMPONENTS |
  NAMESPACES_TRIMBLE_CONNECT
).freeze

Constants inherited from SketchUp::Cop

SketchUp::Cop::SKETCHUP_DEPARTMENT_SEVERITY

Constants included from SketchUp::Config

SketchUp::Config::DEFAULT_CONFIGURATION

Instance Method Summary collapse

Methods included from SketchUp::NamespaceChecker

#check_namespace, #in_namespace?, #on_casgn, #on_class, #on_def, #on_module

Methods inherited from SketchUp::Cop

inherited, #relevant_file?

Instance Method Details

#namespacesObject



54
55
56
# File 'lib/rubocop/sketchup/cop/requirements/shipped_extensions_namespace.rb', line 54

def namespaces
  NAMESPACES
end