fix lint-up

This commit is contained in:
tobiaskaminsky 2017-08-10 18:02:33 +02:00
parent 41645a5075
commit f9c1d2df55
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -111,18 +111,18 @@ else
previous_error_warning_string = ""
File.open previous_lint_report do |file|
previous_error_warning_string = file.find { |line| line =~ /[0-9]* errors and [0-9]* warnings/ }
previous_error_warning_string = file.find { |line| line =~ /([0-9]* error[s]? and )?[0-9]* warning[s]?/ }
end
unless previous_error_warning_string.nil?
previous_results = true
previous_error_string = previous_error_warning_string.match(/[0-9]* errors/)[0]
previous_error_string = previous_error_warning_string.match(/[0-9]* error[s]?/)[0]
previous_error_count = previous_error_string.match(/[0-9]*/)[0].to_i
puts "previous errors: " + previous_error_count.to_s
if CHECK_WARNINGS == true
previous_warning_string = previous_error_warning_string.match(/[0-9]* warnings/)[0]
previous_warning_string = previous_error_warning_string.match(/[0-9]* warning[s]?/)[0]
previous_warning_count = previous_warning_string.match(/[0-9]*/)[0].to_i
puts "previous warnings: " + previous_warning_count.to_s
end