git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 3 of 8 in “doc lint: fix recent regression, make non-.PHONY”
  1. 0/4 doc lint: fix recent regression, make non-.PHONYÆvar Arnfjörð Bjarmason, Oct 15, 2021
  2. 1/4 doc lint: fix error-hiding regressionÆvar Arnfjörð Bjarmason, Oct 15, 2021
  3. 2/4 doc lint: emit errors on STDERRÆvar Arnfjörð Bjarmason, Oct 15, 2021
  4. 4/4 doc lint: make "lint-docs" non-.PHONYÆvar Arnfjörð Bjarmason, Oct 15, 2021
  5. Bagas SanjayaOct 16, 2021
  6. Ævar Arnfjörð BjarmasonOct 16, 2021
  7. 3/4 doc build: speed up "make lint-docs"Ævar Arnfjörð Bjarmason, Oct 15, 2021
  8. Junio C HamanoOct 15, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.