I have RuboCop installed with Rubymine and the inspection errors for rubocop are showing up properly.
Running ⌘+Alt+L converts the code to rubymine style that conflicts with rubocop style.
For example:
some_array = 10.times.map {|index| index * 3} # rubymine
some_array = 10.times.map { |index| index * 3 } # rubocop
rubocop puts spaces inside of inline blocks. a small thing I know. but rubymine autoformats without spaces so I have a crapton of of inspection notices.
Reformat a file Either open your file in the editor and press Ctrl+Alt+Shift+L or in the Project tool window, right-click the file and select Reformat Code.
You can run RuboCop using its default settings on your project by typing rubocop (or bundle exec rubocop if installed with Bundler). If you don't pass any arguments to the command, it will check all the Ruby source files in the current directory, as well as all sub directories.
In Rubymine, go to Settings → Editor → Code Style → Ruby and ensure you have the Spaces around curly braces option checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With