shou2017.com
JP

RubyMine's RuboCop Fix Feature is Incredibly Convenient

Mon Apr 8, 2019
Mon Apr 8, 2019

RuboCop is a gem that performs static code analysis for Ruby, and it’s included in most Rails projects to maintain code quality.

However, RuboCop can be a bit tough for beginners. Just when you think you’re done and ready to commit, RuboCop scolds you. Every time you’re scolded, you have to check the official site or search Google.

With RubyMine, though, it points out areas needing correction while you’re writing code, so you notice issues immediately. The most convenient feature is the Intention Actions feature.

With this feature, RubyMine automatically fixes your code.

Like this:

RubyMines RuboCop Fix Feature is Incredibly Convenient

How to Use

  1. Click the light bulb icon (or press ⌥⏎) to open the suggestion list.
  2. Select an action from the list and press ⏎.

That’s all there is to it.

Here’s a referral code:

Get a discount on new licenses through my referral

See Also