From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Ramsay Jones" <ramsay@ramsayjones.plus.com>,
"Collin Funk" <collin.funk1@gmail.com>,
"Jean-Noël Avila" <jn.avila@free.fr>,
"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v3 1/6] doc: test linkgit macros for well-formedness
Date: Mon, 11 Aug 2025 20:53:15 +0000 [thread overview]
Message-ID: <e79bd6a67ef2ea7247359b2449c7c313c7fa9922.1754945600.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1945.v3.git.1754945600.gitgitgadget@gmail.com>
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Some readers of man pages have reported that they found
malformed linkgit macros in the documentation (absence or bad
spelling).
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
Documentation/gitweb.conf.adoc | 2 +-
Documentation/lint-gitlink.perl | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/gitweb.conf.adoc b/Documentation/gitweb.conf.adoc
index 1348e9b12504..64bebb811c97 100644
--- a/Documentation/gitweb.conf.adoc
+++ b/Documentation/gitweb.conf.adoc
@@ -178,7 +178,7 @@ $export_ok::
Show repository only if this file exists (in repository). Only
effective if this variable evaluates to true. Can be set when
building gitweb by setting `GITWEB_EXPORT_OK`. This path is
- relative to `GIT_DIR`. git-daemon[1] uses 'git-daemon-export-ok',
+ relative to `GIT_DIR`. linkgit:git-daemon[1] uses 'git-daemon-export-ok',
unless started with `--export-all`. By default this variable is
not set, which means that this feature is turned off.
diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl
index aea564dad7ed..f183a18df284 100755
--- a/Documentation/lint-gitlink.perl
+++ b/Documentation/lint-gitlink.perl
@@ -41,6 +41,13 @@ die "BUG: No list of valid linkgit:* files given" unless @ARGV;
@ARGV = $to_check;
while (<>) {
my $line = $_;
+ while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) {
+ my $pos = pos $line;
+ my ($macro, $target, $page, $section) = ($1, $2, $3, $4);
+ if ( $macro ne "linkgit:" && $macro !~ "ifn?def::" && $macro ne "endif::" ) {
+ report($pos, $line, $target, "linkgit: macro expected");
+ }
+ }
while ($line =~ m/linkgit:((.*?)\[(\d)\])/g) {
my $pos = pos $line;
my ($target, $page, $section) = ($1, $2, $3);
--
gitgitgadget
next prev parent reply other threads:[~2025-08-11 20:53 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 13:03 [PATCH 0/6] Introduce more doc linting Jean-Noël Avila via GitGitGadget
2025-08-05 13:03 ` [PATCH 1/6] doc: test linkgit macros for well-formedness Jean-Noël Avila via GitGitGadget
2025-08-05 13:03 ` [PATCH 2/6] doc: check well-formedness of delimited sections Jean-Noël Avila via GitGitGadget
2025-08-05 13:03 ` [PATCH 3/6] doc: check for absence of multiple terms in each entry of desc list Jean-Noël Avila via GitGitGadget
2025-08-05 13:03 ` [PATCH 4/6] doc: check for absence of the form --[no-]parameter Jean-Noël Avila via GitGitGadget
2025-08-05 13:03 ` [PATCH 5/6] doc:git-for-each-ref: fix styling and typos Jean-Noël Avila via GitGitGadget
2025-08-05 13:03 ` [PATCH 6/6] doc lint: check that synopsis manpages have synopsis inlines Jean-Noël Avila via GitGitGadget
2025-08-05 16:56 ` [PATCH 0/6] Introduce more doc linting Junio C Hamano
2025-08-05 19:10 ` [PATCH v2 " Jean-Noël Avila via GitGitGadget
2025-08-05 19:10 ` [PATCH v2 1/6] doc: test linkgit macros for well-formedness Jean-Noël Avila via GitGitGadget
2025-08-05 19:10 ` [PATCH v2 2/6] doc: check well-formedness of delimited sections Jean-Noël Avila via GitGitGadget
2025-08-05 19:10 ` [PATCH v2 3/6] doc: check for absence of multiple terms in each entry of desc list Jean-Noël Avila via GitGitGadget
2025-08-05 20:30 ` [-SPAM-] " Ramsay Jones
2025-08-08 13:00 ` Jean-Noël AVILA
2025-08-06 1:02 ` Collin Funk
2025-08-08 21:52 ` Jean-Noël AVILA
2025-08-05 19:10 ` [PATCH v2 4/6] doc: check for absence of the form --[no-]parameter Jean-Noël Avila via GitGitGadget
2025-08-05 19:10 ` [PATCH v2 5/6] doc:git-for-each-ref: fix styling and typos Jean-Noël Avila via GitGitGadget
2025-08-05 19:10 ` [PATCH v2 6/6] doc lint: check that synopsis manpages have synopsis inlines Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` [PATCH v3 0/6] Introduce more doc linting Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` Jean-Noël Avila via GitGitGadget [this message]
2025-08-11 20:53 ` [PATCH v3 2/6] doc: check well-formedness of delimited sections Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` [PATCH v3 3/6] doc: check for absence of multiple terms in each entry of desc list Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` [PATCH v3 4/6] doc: check for absence of the form --[no-]parameter Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` [PATCH v3 5/6] doc:git-for-each-ref: fix styling and typos Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` [PATCH v3 6/6] doc lint: check that synopsis manpages have synopsis inlines Jean-Noël Avila via GitGitGadget
2025-08-14 16:34 ` [PATCH v3 0/6] Introduce more doc linting Junio C Hamano
2025-08-14 17:23 ` Jean-Noël AVILA
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=e79bd6a67ef2ea7247359b2449c7c313c7fa9922.1754945600.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=collin.funk1@gmail.com \
--cc=git@vger.kernel.org \
--cc=jn.avila@free.fr \
--cc=ramsay@ramsayjones.plus.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).