diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2018-07-13 05:52:04 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-16 21:55:01 (GMT) |
commit | c433600593b1db15a9ba80136dc2096e192322b6 (patch) | |
tree | fbf1de56f0d5ce93d1816dee873b50d5791dd164 /t/check-non-portable-shell.pl | |
parent | ef2d2acceffaa426e27ad21350fb707ddb5f5eec (diff) | |
download | git-c433600593b1db15a9ba80136dc2096e192322b6.zip git-c433600593b1db15a9ba80136dc2096e192322b6.tar.gz git-c433600593b1db15a9ba80136dc2096e192322b6.tar.bz2 |
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>
Diffstat (limited to 't/check-non-portable-shell.pl')
-rwxr-xr-x | t/check-non-portable-shell.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl index 1102857..f6dbe28 100755 --- a/t/check-non-portable-shell.pl +++ b/t/check-non-portable-shell.pl @@ -10,6 +10,8 @@ my $exit_code=0; sub err { my $msg = shift; + s/^\s+//; + s/\s+$//; print "$ARGV:$.: error: $msg: $_\n"; $exit_code = 1; } |