Skip to content
Snippets Groups Projects
Commit 92f72201 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

checksrc: exit error code if warnings or errors

parent 98696688
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,21 @@ my $file=$ARGV[0];
my $max_column = 79;
my $indent = 2;
my $warnings;
my $errors;
sub checkwarn {
my ($num, $col, $file, $line, $msg, $error) = @_;
my $w=$error?"error":"warning";
if($w) {
$warnings++;
}
else {
$errors++;
}
$col++;
print "$file:$num:$col: $w: $msg\n";
print " $line\n";
......@@ -116,3 +126,7 @@ if(!$copyright) {
}
close(R);
if($errors || $warnings) {
exit 5; # return failure
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment