Ruby rubocop

From wikinotes

A ruby linter.

Documentation

official docs https://docs.rubocop.org/rubocop/0.90/index.html
github https://github.com/rubocop-hq/rubocop

Usage

rubocop          # test all files
rubocop file.rb  # test single file

rubocop -D file.rb  # print name of rule-failures
# rubocop:disable RuleByName   # <-- disable rubocop rule for line
def foo(a, b, c)
  # ...
end
# rubocop:enable RuleByName   # <-- re-enable rubocop rule for line