[PATCH 2/4] doc lint: emit errors on STDERR
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Oct 15, 2021, 12:39 UTC
- Message-ID
- <patch-2.4-3e44cdc86a7-20211015T123619Z-avarab@gmail.com>
- In-Reply-To
- <cover-0.4-00000000000-20211015T123619Z-avarab@gmail.com>
Have all of the scripts invoked by "make check-docs" emit their output on STDERR. This does not currently matter due to the way we're invoking them, but will in a subsequent change. It's a good idea to do this in any case for consistency with other tools we invoke.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- Documentation/lint-gitlink.perl | 4 ++-- Documentation/lint-man-end-blurb.perl | 2 +- Documentation/lint-man-section-order.perl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl index b22a367844a..076701ccfac 100755 --- a/Documentation/lint-gitlink.perl +++ b/Documentation/lint-gitlink.perl @@ -30,8 +30,8 @@ sub report { my ($pos, $line, $target, $msg) = @_; substr($line, $pos) = "' <-- HERE"; $line =~ s/^\s+//; - print "$ARGV:$.: error: $target: $msg, shown with 'HERE' below:\n"; - print "$ARGV:$.:\t'$line\n"; + print STDERR "$ARGV:$.: error: $target: $msg, shown with 'HERE' below:\n"; + print STDERR "$ARGV:$.:\t'$line\n"; $exit_code = 1; } diff --git a/Documentation/lint-man-end-blurb.perl b/Documentation/lint-man-end-blurb.perl index d69312e5db5..6bdb13ad9fd 100755 --- a/Documentation/lint-man-end-blurb.perl +++ b/Documentation/lint-man-end-blurb.perl @@ -6,7 +6,7 @@ my $exit_code = 0; sub report { my ($target, $msg) = @_; - print "error: $target: $msg\n"; + print STDERR "error: $target: $msg\n"; $exit_code = 1; } diff --git a/Documentation/lint-man-section-order.perl b/Documentation/lint-man-section-order.perl index b05f9156dd9..425377dfeb7 100755 --- a/Documentation/lint-man-section-order.perl +++ b/Documentation/lint-man-section-order.perl @@ -46,7 +46,7 @@ my $exit_code = 0; sub report { my ($msg) = @_; - print "$ARGV:$.: $msg\n"; + print STDERR "$ARGV:$.: $msg\n"; $exit_code = 1; }
-- 2.33.1.1338.g20da966911a