lib/licensed/reporters/cache_reporter.rb in licensed-2.0.0 vs lib/licensed/reporters/cache_reporter.rb in licensed-2.0.1
- old
+ new
@@ -25,9 +25,25 @@
def report_source(source)
super do |report|
shell.info " #{source.class.type}"
result = yield report
+ warning_reports = report.all_reports.select { |report| report.warnings.any? }.to_a
+ if warning_reports.any?
+ shell.newline
+ shell.warn " * Warnings:"
+ warning_reports.each do |report|
+ display_metadata = report.map { |k, v| "#{k}: #{v}" }.join(", ")
+
+ shell.warn " * #{report.name}"
+ shell.warn " #{display_metadata}" unless display_metadata.empty?
+ report.warnings.each do |warning|
+ shell.warn " - #{warning}"
+ end
+ shell.newline
+ end
+ end
+
errored_reports = report.all_reports.select { |report| report.errors.any? }.to_a
if errored_reports.any?
shell.newline
shell.error " * Errors:"
errored_reports.each do |report|