lib/scss_lint/reporter/default_reporter.rb in scss-lint-0.23.1 vs lib/scss_lint/reporter/default_reporter.rb in scss-lint-0.24.0
- old
+ new
@@ -1,14 +1,14 @@
module SCSSLint
# Reports a single line per lint.
class Reporter::DefaultReporter < Reporter
def report_lints
- if lints.any?
- lints.map do |lint|
- type = lint.error? ? '[E]'.color(:red) : '[W]'.color(:yellow)
- "#{lint.filename.color(:cyan)}:" << "#{lint.location.line}".color(:magenta) <<
- " #{type} #{lint.description}"
- end.join("\n") + "\n"
- end
+ return unless lints.any?
+
+ lints.map do |lint|
+ type = lint.error? ? '[E]'.color(:red) : '[W]'.color(:yellow)
+ "#{lint.filename.color(:cyan)}:" << "#{lint.location.line}".color(:magenta) <<
+ " #{type} #{lint.description}"
+ end.join("\n") + "\n"
end
end
end