Cops
In RuboCop lingo the various checks performed on the code are called cops. Each cop is responsible for detecting one particular offense. There are several cop departments, grouping the cops by class of offense. A short description of the different departments is provided below.
Read more about RuboCop's cops and departments.
SketchUp's Cops and Departments
rubocop-sketchup
adds new departments and cops that are specific to extension development for SketchUp.
All cops are located under lib/rubocop/sketchup
, and contain examples/documentation.
SketchupRequirements
SketchupRequirements
is the most important department. This one checks for the technical requirements that extensions need to meet in order to be hosted on Extension Warehouse. Address flagged issues from this department as soon as possible.
Note that the complete technical requirements for Extension Warehouse is not fully covered by these cops. But they get you a long way if you pass their control.
SketchupDeprecations
SketchupDeprecations
is also an important department. Not rejection cause at Extension Warehouse, but worth paying attention to as it describe features of the API we would like to discourage the use of. Eventually some of them might be removed.
SketchupPerformance
SketchupPerformance
looks for common issues that impact performance. It's highly recommended to review what these cops report and evaluate if there are improvements that can be made to your extension.
SketchupSuggestions
SketchupSuggestions
might be the more noisy of the departments. These are more general gentle suggestions for common improvements to raise the quality of your extension and source code. No need to address everything this reports, evaluate to the context of your extension. In general this department will be a collection of established best practices.
Available cops
In the following section you find all available cops:
Department SketchupDeprecations
- SketchupDeprecations/AddSeparatorToMenu
- SketchupDeprecations/OperationNextTransparent
- SketchupDeprecations/RequireAll
- SketchupDeprecations/SetTextureProjection
- SketchupDeprecations/ShowRubyPanel
- SketchupDeprecations/SketchupSet
Department SketchupPerformance
- SketchupPerformance/OpenSSL
- SketchupPerformance/OperationDisableUI
- SketchupPerformance/SelectionBulkChanges
- SketchupPerformance/TypeCheck
- SketchupPerformance/Typename
Department SketchupRequirements
- SketchupRequirements/ApiNamespace
- SketchupRequirements/Exit
- SketchupRequirements/ExtensionNamespace
- SketchupRequirements/FileStructure
- SketchupRequirements/GemInstall
- SketchupRequirements/GetExtensionLicense
- SketchupRequirements/GlobalConstants
- SketchupRequirements/GlobalInclude
- SketchupRequirements/GlobalMethods
- SketchupRequirements/GlobalVariables
- SketchupRequirements/LanguageHandlerGlobals
- SketchupRequirements/LoadPath
- SketchupRequirements/MinimalRegistration
- SketchupRequirements/ObserversStartOperation
- SketchupRequirements/RegisterExtension
- SketchupRequirements/RubyCoreNamespace
- SketchupRequirements/RubyStdLibNamespace
- SketchupRequirements/ShippedExtensionsNamespace
- SketchupRequirements/SketchupExtension
- SketchupRequirements/SketchupRequire
Department SketchupSuggestions
- SketchupSuggestions/AddGroup
- SketchupSuggestions/Compatibility
- SketchupSuggestions/DynamicComponentInternals
- SketchupSuggestions/FileEncoding
- SketchupSuggestions/ModelEntities
- SketchupSuggestions/MonkeyPatchedApi
- SketchupSuggestions/OperationName
- SketchupSuggestions/SketchupFindSupportFile
- SketchupSuggestions/ToolDrawingBounds
- SketchupSuggestions/ToolInvalidate
- SketchupSuggestions/ToolUserInput
- SketchupSuggestions/ToolbarTimer