summaryrefslogtreecommitdiffstats
path: root/httpd/cgi-bin/check
diff options
context:
space:
mode:
authorot <ot@localhost>2007-04-18 06:32:52 +0000
committerot <ot@localhost>2007-04-18 06:32:52 +0000
commit44f4d02df2eef81a585df71cdc6c7e8726656192 (patch)
treef8cc232acd6d3411b2375eb7b59606cae7a4ef34 /httpd/cgi-bin/check
parentf7548ae2f16f3b158d67e10fb3906bbeca104a0f (diff)
downloadmarkup-validator-44f4d02df2eef81a585df71cdc6c7e8726656192.zip
markup-validator-44f4d02df2eef81a585df71cdc6c7e8726656192.tar.gz
markup-validator-44f4d02df2eef81a585df71cdc6c7e8726656192.tar.bz2
Since we have a number of different sources for errors (xml-wf, parsing, ...)
better make sure that they are sorted before output (+test case)
Diffstat (limited to 'httpd/cgi-bin/check')
-rwxr-xr-xhttpd/cgi-bin/check8
1 files changed, 6 insertions, 2 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index da33667..7f96afd 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -14,7 +14,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.500 2007-04-18 06:27:20 ot Exp $
+# $Id: check,v 1.501 2007-04-18 06:32:52 ot Exp $
#
# Disable buffering on STDOUT!
@@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.500 $;
+ $VERSION = q$Revision: 1.501 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -1622,6 +1622,10 @@ sub report_errors ($) {
push @{$Errors}, $Errors_bytype{$err_num};
}
}
+ else {
+ # sort error by lines
+ @{$Errors} = sort {$a->{line} <=> $b->{line} } @{$Errors};
+ }
return $number_of_errors, $number_of_warnings, $number_of_info, $Errors;
}