Rubocop with rubocop-sketchup

First, we need to make sure Package Control is installed in Sublime.
Here is a more detailed explanation: Installation - Package Control

Summary:

  1. Install & open Sublime text (https://www.sublimetext.com/)
  2. Open the command palette with the following keyboard shortcuts in Sublime.
    Win/Linux: ctrl+shift+p, Mac: cmd+shift+p
  3. Type Install Package Control, press enter
  4. Be sure to restart Sublime Text after installation.

Install Rubocop :robot:

To use rubocop and rubocop-sketchup make sure to install the right version specified in the following Github page. GitHub - SketchUp/rubocop-sketchup: Rubocop cops for SketchUp - test against our Extension Warehouse technical requirements and other pitfalls

Summary:
Below you will see what to install through the terminal window.

gem install rubocop -v 0.93
gem install rubocop-sketchup

Install Rubocop in Sublime Text

For a more detailed explanation here are a couple of links.
• RuboCop - Package Control
• Install RuboCop in Sublime Text

Sumary:

  1. Once Package Control is installed, go back into Sublime Text and open the Command Palette. Win/Linux: ctrl+shift+p, Mac: cmd+shift+p
  2. Type install and click Package Control: Install Packages in the menu that appears
  3. Type RuboCop into the new box and choose RuboCop in the menu.

Here is how to see all your installed packages in Sublime Text.
Sublime Text → Preferences → Package Control → List Packages


Hope this explains the process of installing RuboCop inside Sublime Text. :smiley:

2 Likes