lib/swiftformat/swiftformat.rb in danger-swiftformat-0.4.0 vs lib/swiftformat/swiftformat.rb in danger-swiftformat-0.5.0
- old
+ new
@@ -39,11 +39,11 @@
run_time: run_time(output)
}
}
end
- ERRORS_REGEX = /rules applied:(.*)\n.*updated (.*)$/
+ ERRORS_REGEX = /rules applied:(.*)\n.*updated (.*)$/.freeze
def errors(output)
errors = []
output.scan(ERRORS_REGEX) do |match|
next if match.count < 2
@@ -54,10 +54,10 @@
}
end
errors
end
- RUNTIME_REGEX = /.*swiftformat completed.*(.+\..+)s/
+ RUNTIME_REGEX = /.*swiftformat completed.*(.+\..+)s/.freeze
def run_time(output)
if RUNTIME_REGEX.match(output)
RUNTIME_REGEX.match(output)[1]
else