Rubocop: Simple way to disable a set of cops (Style cops in my case)

Created on 4 Jun 2017  路  3Comments  路  Source: rubocop-hq/rubocop

I want to add RuboCop's checks to a project but I don't want to be too rude with coding style. So I am looking for a simple way to disable all style cops for now.

It seems to be a classical case and it could be a nice way to incrementally adopt RuboCop.


Expected behavior

I would like to disable a set of cops, like Style cops in my case.

Style/*:
  Enabled: false

Could also be StyleCops instead of Style/*, it is just a proposition.

Actual behavior

I have to manually insert all style cops in the .rubocop.yml file or I missed something.

RuboCop version

$ rubocop -V
0.49.1 (using Parser 2.4.0.0, running on ruby 2.3.1 x86_64-linux-gnu)

Most helpful comment

You can disable a group like this:

Style:
  Enabled: false

Also, the fear of being rude is one of the selling points of programmatic enforcement. If the computer told you to do something, it doesn't affect your interpersonal relationships. 馃槈

All 3 comments

You can disable a group like this:

Style:
  Enabled: false

Also, the fear of being rude is one of the selling points of programmatic enforcement. If the computer told you to do something, it doesn't affect your interpersonal relationships. 馃槈

Oups, my bad.

Also, the fear of being rude is one of the selling points of programmatic enforcement. If the computer told you to do something, it doesn't affect your interpersonal relationships. :wink:

I want RuboCop to be appreciate by new users, me included. And because many style cops are matters of taste, I prefer to disable them for now.

Thank you for this quick answer!

I want RuboCop to be appreciate by new users, me included. And because many style cops are matters of taste, I prefer to disable them for now.

Understood. 馃槉 Most cops are configurable, so you can slowly adopt a few at a time. You can find the configuration options in default.yml, and generally the cop documentation will have information about the different options. 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

printercu picture printercu  路  3Comments

Aqualon picture Aqualon  路  3Comments

AndreiMotinga picture AndreiMotinga  路  3Comments

ecbrodie picture ecbrodie  路  3Comments

bbatsov picture bbatsov  路  3Comments