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 <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ef2d2accef
commit
c433600593
@@ -10,6 +10,8 @@ my $exit_code=0;
|
|||||||
|
|
||||||
sub err {
|
sub err {
|
||||||
my $msg = shift;
|
my $msg = shift;
|
||||||
|
s/^\s+//;
|
||||||
|
s/\s+$//;
|
||||||
print "$ARGV:$.: error: $msg: $_\n";
|
print "$ARGV:$.: error: $msg: $_\n";
|
||||||
$exit_code = 1;
|
$exit_code = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user