Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If a Rubocop rule is disabled in-line does it need to be re-enabled

Tags:

ruby

rubocop

If you disable a Rubocop rule in-line and do not re-enable it, will the rule be disabled for all subsequence files or is an in-line disable limited to the scope of the current file?

For example, if I enter this before a couple of methods that I know break the line length rule:

# rubocop:disable Metrics/LineLength

Is this rule disable for the rest of the file, or for all subsequent files in the current scan?

like image 880
11 revs, 10 users 40% Avatar asked Jun 20 '16 11:06

11 revs, 10 users 40%


1 Answers

In-line config is applied to the given file only (just tested it).

like image 114
Vasiliy Ermolovich Avatar answered Sep 21 '22 11:09

Vasiliy Ermolovich