Shortcut for 'fix all auto-correctable offenses' - Rubocop
Hi Community,
I am very much struggling to get my Rubocop, Linting and Auto-Correction to run as I want it to.
Rubocop is perfectly fine showing me the warnings and suggestions and I can even 'fix all auto-correctable offenses' when I hover over the inspections and click on it.
I want to achieve either:
a) make a shortcut which is triggering the 'fix all auto-correctable offenses'
b) automatically trigger 'fix all auto-correctable offenses' on save
These corrections should follow the rubocop styles -Is there any way to do this?
I am aware of this documentation: https://www.jetbrains.com/help/ruby/rubocop.html
Please sign in to leave a comment.
Why doesn't this work?
Control-Shift-P (or whatever your binding is to get to the Actions Palette)
start typing "Fix all" -- not found unless you have recently executed this command from Context Actions
Presuming it was found:
Alt+Enter (should assign a shortcut, instead, silently closes the Actions Palette)
Why?
Going to Settings>Keymap this command is not to be found, so that's a dead end as well.
I have this very same need. It seems that all the pieces for a great Rubocop integration are there, but there is not a quick way to launch it.
While a more sensible solution is being created, I have found that External Tools are a satisfactory workaround:
Just add it to a shortcut and voila!