Class: RuboCop::Cop::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/monkey_patches/registry_cop.rb

Instance Method Summary collapse

Instance Method Details

we monkeypatch this warning to replace rubocop with cookstyle



6
7
8
9
10
# File 'lib/rubocop/monkey_patches/registry_cop.rb', line 6

def print_department_missing_warning(name, path)
  message = "no department given for #{name}."
  message += ' Run `cookstyle -a --only Migration/DepartmentName` to fix.' if path.end_with?('.rb')
  emit_warning(path, message)
end