Skip to content

Commit c433600

Browse files
sunshinecogitster
authored andcommitted
t/check-non-portable-shell: make error messages more compact
Error messages emitted by this linting script are long and noisy, consisting of several sections: <test-script>:<line#>: error: <explanation>: <failed-shell-text> The line of failed shell text, usually coming from within a test body, is often indented by one or two TABs, with the result that the actual (important) text is separated from <explanation> by a good deal of empty space. This can make for a difficult read, especially on typical 80-column terminals. Make the messages more compact and perhaps a bit easier to digest by folding out the leading whitespace from <failed-shell-text>. Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ef2d2ac commit c433600

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/check-non-portable-shell.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
sub err {
1212
my $msg = shift;
13+
s/^\s+//;
14+
s/\s+$//;
1315
print "$ARGV:$.: error: $msg: $_\n";
1416
$exit_code = 1;
1517
}

0 commit comments

Comments
 (0)