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
11
12
# File 'lib/rubocop/monkey_patches/registry_cop.rb', line 6

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