lib/swiftformat/swiftformat.rb in danger-swiftformat-0.3.5 vs lib/swiftformat/swiftformat.rb in danger-swiftformat-0.3.6

- old
+ new

@@ -14,10 +14,11 @@ cmd = [@path] + files cmd << additional_args.split unless additional_args.nil? || additional_args.empty? cmd << %w(--dryrun --verbose) output = Cmd.run(cmd.flatten) raise "error running swiftformat: empty output" if output.empty? + process(output) end private @@ -34,9 +35,10 @@ def errors(output) errors = [] output.scan(ERRORS_REGEX) do |match| next if match.count < 2 + errors << { file: match[1], rules: match[0].split(",").map(&:strip) } end