Top "Rubocop" questions

RuboCop is a Ruby static code analyzer.

Rubocop Linelength: How to ignore lines with comments?

Using a Rails 4 app I would like Rubocop to ignore lines with comments (just a comment or some code with …

ruby rubocop
What is meant by 'Assignment Branch Condition Size too high' and how to fix it?

In my Rails app, I use Rubocop to check for problems. Today it gave me an error like this : Assignment …

ruby-on-rails ruby code-metrics rubocop
How to tell Rubocop to ignore a specific directory or file

My project is extending open-source classes from a third-party gem that we don't want to hold to the same coding …

ruby rubocop
RuboCop: Line is too long ← How to Ignore?

I just added RuboCop to a rails project and installed the Sublime package to see RuboCop suggestions in the editor. …

ruby-on-rails ruby sublimetext3 rubocop
rubocop on VScode not working.Error "rubocop is not executable"

Recently I installed rubocop on vscode. However, it doesn't work.Error message is below. rubocop is not excutable execute path …

ruby visual-studio-code rubocop
Top-level class documentation

Rubycop outputs messages like: app/controllers/welcome_controller.rb:1:1: C: Missing top-level class documentation comment. class WelcomeController < ApplicationController ^^^^^ I …

ruby rubocop
Rails: rubocop disable Class has too many lines error

I have a class with constants, many constants. And rubocop is complaining about the length of this Class, which I …

ruby-on-rails rubocop
vscode( vscode-ruby + rubocop ) how to auto correct on save?

Environments vscode Version 1.19.1 (1.19.1) rubocop (0.52.1) Darwin mbp 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64 ruby 2.3.5p376 (2017-09…

ruby visual-studio-code rubocop
Disable frozen string literal comment checking

I'm newbie in Rails. I am using 'Rubocop' for checking standards, however I'm bothered with the way it checks the …

ruby-on-rails ruby rubocop
Rubocop 25 line block size and RSpec tests

A typical RSpec unit test makes extensive use of nested Ruby blocks in order to structure the code and make …

ruby rspec rubocop