Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Rubocop argument list length

Tags:

ruby

rubocop

Currently I'm getting feedback from Rubocop saying "Avoid parameter lists longer than 5 parameters."

What is the #Rubocop:disable command to disable this? I'm happy with the code having an extra argument so I don't want to change it.

like image 508
IAmAkittycatAMA Avatar asked Nov 20 '15 05:11

IAmAkittycatAMA


2 Answers

You could drop a file named .rubocop.yml in your project root directory with the following content.

Metrics/ParameterLists:
  Enabled: false
like image 191
orien Avatar answered Sep 30 '22 17:09

orien


# rubocop:disable Metrics/ParameterLists 

your function goes here

# rubocop:enable Metrics/ParameterLists
like image 44
sofs1 Avatar answered Sep 30 '22 17:09

sofs1