Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to silence Rubocop warning on Assignment Branch Condition?

Tags:

ruby

rubocop

I would like to silence a specific Rubocop warning:

Assignment Branch Condition size for plot_defaults is too high. [21.05/15]

What is the appropriate syntax to do this in the code on a comment line like:

# rubocop: disable <???>

like image 653
maasha Avatar asked May 11 '15 18:05

maasha


2 Answers

I believe this is the message for the Metrics/AbcSize cop.

# rubocop:disable Metrics/AbcSize
like image 141
Jeff Price Avatar answered Oct 13 '22 11:10

Jeff Price


On your Rubocop config

Metrics/AbcSize:
  Enabled: false
like image 10
mpalencia Avatar answered Oct 13 '22 13:10

mpalencia