Disable Rubocop protocol argument list length

I am currently receiving feedback from Rubocop: "Avoid parameter lists with more than 5 parameters."

What is the #Rubocop: disable command to disable it? I am pleased that the code has an additional argument, so I do not want to change it.

+4
source share
2 answers

You can delete the file with the name .rubocop.ymlin the root directory of the project with the following contents.

Metrics/ParameterLists:
  Enabled: false
+3
source

For your convenience, my .rubocop.yml is used here, which I often use.

See the official explanation of .rubocop.yml here .

AllCops:
  Excludes:
    - Berksfile
    - recipes / basic.rb
    - attributes/*.rb

# Customize rules
Metrics/LineLength:
  Max: 95

MethodLength:
  Max: 35

Metrics/AbcSize:
   Enabled: false

BlockLength:
  Max: 70

. , .

Rubocop: Ruby

0

Source: https://habr.com/ru/post/1616674/


All Articles