lib/rubocop/cop/registry.rb in rubocop-0.84.0 vs lib/rubocop/cop/registry.rb in rubocop-0.85.0
- old
+ new
@@ -110,10 +110,12 @@
!badge.qualified? && unqualified_cop_names.include?(name)
end
def print_warning(name, path)
message = "#{path}: Warning: no department given for #{name}."
- message += ' Run `rubocop -a --only Migration/DepartmentName` to fix.' if path.end_with?('.rb')
+ if path.end_with?('.rb')
+ message += ' Run `rubocop -a --only Migration/DepartmentName` to fix.'
+ end
warn message
end
def unqualified_cop_names
@unqualified_cop_names ||=