All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 5/5] doc lint: lint and fix missing "GIT" end sections
Date: Fri, 26 Mar 2021 11:36:50 +0100	[thread overview]
Message-ID: <patch-5.6-d4004b6a7cb-20210326T103454Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.6-00000000000-20210326T103454Z-avarab@gmail.com>

Lint for and fix the three manual pages that were missing the standard
"Part of the linkgit:git[1] suite" end section.

We only do this for the man[157] section documents (we don't have
anything outside those sections), not files to be included,
howto *.txt files etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Documentation/Makefile           |  2 ++
 Documentation/git-credential.txt |  4 ++++
 Documentation/git-p4.txt         |  4 ++++
 Documentation/gitnamespaces.txt  |  4 ++++
 Documentation/lint-man-txt.perl  | 24 ++++++++++++++++++++++++
 5 files changed, 38 insertions(+)
 create mode 100755 Documentation/lint-man-txt.perl

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 6bfd8c75772..2b6cd0f7be2 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -490,6 +490,8 @@ lint-docs::
 		--section=5 $(MAN5_TXT) \
 		--section=7 $(MAN7_TXT)	\
 		--to-lint $(ALL_TXT)
+	$(QUIET_LINT)$(PERL_PATH) lint-man-txt.perl \
+		$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 
 ifeq ($(wildcard po/Makefile),po/Makefile)
 doc-l10n install-l10n::
diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt
index 31c81c4c026..206e3c5f407 100644
--- a/Documentation/git-credential.txt
+++ b/Documentation/git-credential.txt
@@ -159,3 +159,7 @@ empty string.
 +
 Components which are missing from the URL (e.g., there is no
 username in the example above) will be left unset.
+
+GIT
+---
+Part of the linkgit:git[1] suite
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index f89e68b424c..38e5257b2a4 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -762,3 +762,7 @@ IMPLEMENTATION DETAILS
   message indicating the p4 depot location and change number.  This
   line is used by later 'git p4 sync' operations to know which p4
   changes are new.
+
+GIT
+---
+Part of the linkgit:git[1] suite
diff --git a/Documentation/gitnamespaces.txt b/Documentation/gitnamespaces.txt
index b614969ad2c..1c8d2ecc358 100644
--- a/Documentation/gitnamespaces.txt
+++ b/Documentation/gitnamespaces.txt
@@ -62,3 +62,7 @@ git clone ext::'git --namespace=foo %s /tmp/prefixed.git'
 ----------
 
 include::transfer-data-leaks.txt[]
+
+GIT
+---
+Part of the linkgit:git[1] suite
diff --git a/Documentation/lint-man-txt.perl b/Documentation/lint-man-txt.perl
new file mode 100755
index 00000000000..d69312e5db5
--- /dev/null
+++ b/Documentation/lint-man-txt.perl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my $exit_code = 0;
+sub report {
+	my ($target, $msg) = @_;
+	print "error: $target: $msg\n";
+	$exit_code = 1;
+}
+
+local $/;
+while (my $slurp = <>) {
+	report($ARGV, "has no 'Part of the linkgit:git[1] suite' end blurb")
+		unless $slurp =~ m[
+		^GIT\n
+		 ---\n
+		\QPart of the linkgit:git[1] suite\E \n
+		\z
+	]mx;
+}
+
+exit $exit_code;
-- 
2.31.0.419.gfc6e4cae13


  parent reply	other threads:[~2021-03-26 10:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 10:36 [PATCH 0/5] small doc make and lint fixes Ævar Arnfjörð Bjarmason
2021-03-26 10:36 ` [PATCH 1/5] Documentation/Makefile: make $(wildcard howto/*.txt) a var Ævar Arnfjörð Bjarmason
2021-03-28  6:14   ` Junio C Hamano
2021-03-26 10:36 ` [PATCH 2/5] Documentation/Makefile: make $(wildcard <doc deps>) " Ævar Arnfjörð Bjarmason
2021-03-28  6:28   ` Junio C Hamano
2021-03-26 10:36 ` [PATCH 3/5] doc lint: Perl "strict" and "warnings" in lint-gitlink.perl Ævar Arnfjörð Bjarmason
2021-03-28  6:28   ` Junio C Hamano
2021-03-26 10:36 ` [PATCH 4/5] doc lint: fix bugs in, simplify and improve lint script Ævar Arnfjörð Bjarmason
2021-03-26 11:00   ` Jeff King
2021-03-28  1:35     ` Junio C Hamano
2021-03-26 12:48   ` Philip Oakley
2021-03-28  1:34     ` Junio C Hamano
2021-03-28  6:38   ` Junio C Hamano
2021-03-26 10:36 ` Ævar Arnfjörð Bjarmason [this message]
2021-03-26 11:04   ` [PATCH 5/5] doc lint: lint and fix missing "GIT" end sections Jeff King
2021-03-26 15:32     ` Ævar Arnfjörð Bjarmason
2021-03-27  9:50       ` Jeff King
2021-03-28  6:42   ` Junio C Hamano
2021-03-28 17:53     ` Junio C Hamano
2021-04-09 11:49       ` Ævar Arnfjörð Bjarmason
2021-04-10  4:14         ` Junio C Hamano
2021-03-26 11:06 ` [PATCH 0/5] small doc make and lint fixes Jeff King
2021-03-26 15:18   ` Ævar Arnfjörð Bjarmason
2021-03-27  9:48     ` Jeff King
2021-04-09 15:02 ` [PATCH v2 0/7] " Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 1/7] Documentation/Makefile: make $(wildcard howto/*.txt) a var Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 2/7] Documentation/Makefile: make doc.dep dependencies a variable again Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 3/7] doc lint: Perl "strict" and "warnings" in lint-gitlink.perl Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 4/7] doc lint: fix bugs in, simplify and improve lint script Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 5/7] doc lint: lint and fix missing "GIT" end sections Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 6/7] doc lint: lint relative section order Ævar Arnfjörð Bjarmason
2021-04-09 15:02   ` [PATCH v2 7/7] docs: fix linting issues due to incorrect " Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-5.6-d4004b6a7cb-20210326T103454Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.