Last Updated: July 03, 2017
·
193
· lazybios

rubocop tips

rubocop --auto-gen-config


.rubocop.yml

config example:
https://github.com/bbatsov/rubocop/blob/master/config/default.yml

"run rubocop -D when I need the rule names rather than looking in the documentation."

# rubocop:disable RuleByName
This is a long line 
# rubocop:enable RuleByName
# rubocop:disable BlockComments, AsciiComments
method(argument) # rubocop:disable SomeRule, SomeOtherRule