I’d like to use Rubocop to check the code of a plugin I’m writing. I’ve tried searching this forum, but haven’t found many references to Rubocop and nothing the clarifies for me where or how I should install it.
I’ve downloaded rubocop-sketchup-master.zip from GitHub following a link in one of the few references to Rubocop that I could find on this forum, and extracted it in my Downloads folder to rubocop-sketchup-master.
I expect it has to be copied somewhere (on MacOS Mojave 10.14.6) - but where?
The instructions say only:
gem install rubocop-sketchup
but don’t say where I should run that command.
Tried using that command in the Sketchup Ruby console (SU 2020.1), but it gives an error
> gem install rubocop Error: #<NameError: undefined local variable or method `rubocop' for main:Object> <main>:in `<main>' SketchUp:1:in `eval'
Is there a simple guide to installation and use that I’m just not finding?
I’ve looked at the instructions at
but they seem to assume a level of knowledge about this that I just don’t have.
They say I need to have Ruby 2.2+ installed, which I think I already do have on any recent MacOS installation, but I can’t find where it is. Nor am I clear if Rubocop should link to that, or to the SU specific Ruby installed by the SU installer.
Thanks for any link to more specific instructions, or for suggestions on how to get it to work.