lib/swiftformat/swiftformat.rb in danger-swiftformat-0.6.0 vs lib/swiftformat/swiftformat.rb in danger-swiftformat-0.7.0

- old
+ new

@@ -39,25 +39,25 @@ run_time: run_time(output) } } end - ERRORS_REGEX = /rules applied:(.*)\n.*updated (.*)$/.freeze + ERRORS_REGEX = /Formatting\s(.*)\n-- rules applied:(.*)$/.freeze 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) + file: match[0], + rules: match[1].split(",").map(&:strip) } end errors end - RUNTIME_REGEX = /.*swiftformat completed.*(.+\..+)s/.freeze + RUNTIME_REGEX = /.*SwiftFormat completed.*(.+\..+)s/.freeze def run_time(output) if RUNTIME_REGEX.match(output) RUNTIME_REGEX.match(output)[1] else