I'm sure everyone has the experience of trying hard to avoid getting angry while saying, "I can't help it here!" So here's how to disable the warning. Note that if you use it too much, the meaning of RuboCop will be lost, but let's find out where to use it and make good use of it!
# rubocop:disable all
~ Describe the process here ~
# rubocop:enable all
# rubocop:disable Style/LineLength, Style/StringLiterals
~ Describe the process here ~
# rubocop:enable Style/LineLength, Style/StringLiterals
for x in (0..19) # rubocop:disable all
for x in (0..19) # rubocop:disable Style/AvoidFor
Recommended Posts