Class: RuboCop::SketchUp::Cop Abstract

Inherits:
WorkaroundCop
  • Object
show all
Includes:
Config
Defined in:
lib/rubocop/sketchup/cop.rb

Overview

This class is abstract.

parent class to SketchUp cops

The criteria for whether rubocop-sketchup analyzes a certain ruby file is configured via `AllCops/SketchUp`. For example, if you want to customize your project to scan all files within a `test/` directory then you could add this to your configuration:

Examples:

configuring analyzed paths


AllCops:
  SketchUp:
    SketchupDeprecations:
      Exclude:
      - '_test.rb$'
      - '(?:^|/)test/'

Direct Known Subclasses

Cop::SketchupDeprecations::AddSeparatorToMenu, Cop::SketchupDeprecations::OperationNextTransparent, Cop::SketchupDeprecations::RequireAll, Cop::SketchupDeprecations::SetTextureProjection, Cop::SketchupDeprecations::ShowRubyPanel, Cop::SketchupDeprecations::SketchupSet, Cop::SketchupPerformance::OpenSSL, Cop::SketchupPerformance::OperationDisableUI, Cop::SketchupPerformance::SelectionBulkChanges, Cop::SketchupPerformance::Typename, Cop::SketchupRequirements::ApiNamespace, Cop::SketchupRequirements::Exit, Cop::SketchupRequirements::ExtensionNamespace, Cop::SketchupRequirements::FileStructure, Cop::SketchupRequirements::GlobalConstants, Cop::SketchupRequirements::GlobalInclude, Cop::SketchupRequirements::GlobalMethods, Cop::SketchupRequirements::GlobalVariables, Cop::SketchupRequirements::LanguageHandlerGlobals, Cop::SketchupRequirements::LoadPath, Cop::SketchupRequirements::MinimalRegistration, Cop::SketchupRequirements::ObserversStartOperation, Cop::SketchupRequirements::RegisterExtension, Cop::SketchupRequirements::RubyCoreNamespace, Cop::SketchupRequirements::RubyStdLibNamespace, Cop::SketchupRequirements::ShippedExtensionsNamespace, Cop::SketchupRequirements::SketchupExtension, Cop::SketchupSuggestions::Compatibility, Cop::SketchupSuggestions::DynamicComponentInternals, Cop::SketchupSuggestions::FileEncoding, Cop::SketchupSuggestions::ModelEntities, Cop::SketchupSuggestions::MonkeyPatchedApi, Cop::SketchupSuggestions::OperationName, Cop::SketchupSuggestions::SketchupFindSupportFile, Cop::SketchupSuggestions::SketchupRequire

Constant Summary

Constants included from Config

RuboCop::SketchUp::Config::DEFAULT_CONFIGURATION

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(subclass) ⇒ Object

Invoke the original inherited hook so our cops are recognized


46
47
48
# File 'lib/rubocop/sketchup/cop.rb', line 46

def self.inherited(subclass)
  RuboCop::Cop::Cop.inherited(subclass)
end

Instance Method Details

#relevant_file?(file) ⇒ Boolean

Returns:

  • (Boolean)

50
51
52
# File 'lib/rubocop/sketchup/cop.rb', line 50

def relevant_file?(file)
  relevant_rubocop_sketchup_file?(file) && super
end