Skip to content

Commit ac974aa

Browse files
committed
ci(danger): fix processing of errors from html5validator.
Danger was failing when a report started from "ERROR:html5validator.validator:" because it expected a line with a warning rather an error. It has been fixed now. Fix #1132
1 parent 1671caf commit ac974aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dangerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ if File.file?(validator_output)
390390
errors_count = 0
391391
File.readlines(validator_output).each do |line|
392392
errors_count += 1
393-
line.sub!(/^WARNING:html5validator.validator:/, '')
393+
line.sub!(/^(ERROR|WARNING):html5validator.validator:/, '')
394394

395395
parsed = line.match(/^"file:(?<file>[^"]+)":(?<line>\d+)[^:]+: (error|info warning): (?<msg>.+)/)
396396
msg = parsed['msg'].sub(/\.$/, '')

0 commit comments

Comments
 (0)