From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Jean-Noël Avila" <jn.avila@free.fr>,
"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v2 6/6] doc lint: check that synopsis manpages have synopsis inlines
Date: Tue, 05 Aug 2025 19:10:45 +0000 [thread overview]
Message-ID: <d57478ea5cd8fb6166dddcea30e72a42df79ba2a.1754421046.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1945.v2.git.1754421045.gitgitgadget@gmail.com>
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
When switching manpages to the synopsis style, the description lists of
options need to be switched to inline synopsis for proper formatting. This
is done by enclosing the option name in double backticks, e.g. `--option`.
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
Documentation/git-checkout.adoc | 2 +-
Documentation/git-refs.adoc | 20 ++++++++++----------
Documentation/lint-documentation-style.perl | 6 ++++++
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-checkout.adoc b/Documentation/git-checkout.adoc
index 40e02cfd6562..ff1cb29bc1f8 100644
--- a/Documentation/git-checkout.adoc
+++ b/Documentation/git-checkout.adoc
@@ -334,7 +334,7 @@ include::diff-context-options.adoc[]
separated with _NUL_ character and all other characters are taken
literally (including newlines and quotes).
-<branch>::
+`<branch>`::
Branch to checkout; if it refers to a branch (i.e., a name that,
when prepended with "refs/heads/", is a valid ref), then that
branch is checked out. Otherwise, if it refers to a valid
diff --git a/Documentation/git-refs.adoc b/Documentation/git-refs.adoc
index 4d6dc994f92e..5d26de8acb22 100644
--- a/Documentation/git-refs.adoc
+++ b/Documentation/git-refs.adoc
@@ -20,41 +20,41 @@ This command provides low-level access to refs.
COMMANDS
--------
-migrate::
+`migrate`::
Migrate ref store between different formats.
-verify::
+`verify`::
Verify reference database consistency.
OPTIONS
-------
-The following options are specific to 'git refs migrate':
+The following options are specific to `git refs migrate`:
---ref-format=<format>::
+`--ref-format=<format>`::
The ref format to migrate the ref store to. Can be one of:
+
include::ref-storage-format.adoc[]
---dry-run::
+`--dry-run`::
Perform the migration, but do not modify the repository. The migrated
refs will be written into a separate directory that can be inspected
separately. The name of the directory will be reported on stdout. This
can be used to double check that the migration works as expected before
performing the actual migration.
---reflog::
---no-reflog::
+`--reflog`::
+`--no-reflog`::
Choose between migrating the reflog data to the new backend,
and discarding them. The default is "--reflog", to migrate.
-The following options are specific to 'git refs verify':
+The following options are specific to `git refs verify`:
---strict::
+`--strict`::
Enable stricter error checking. This will cause warnings to be
reported as errors. See linkgit:git-fsck[1].
---verbose::
+`--verbose`::
When verifying the reference database consistency, be chatty.
KNOWN LIMITATIONS
diff --git a/Documentation/lint-documentation-style.perl b/Documentation/lint-documentation-style.perl
index 11321a151bca..d7ab7322939e 100755
--- a/Documentation/lint-documentation-style.perl
+++ b/Documentation/lint-documentation-style.perl
@@ -21,6 +21,12 @@ while (my $line = <>) {
if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
report($line, "definition list item with a `--[no-]` parameter");
}
+ if ($line =~ /^\[synopsis\]$/) {
+ $synopsis_style = 1;
+ }
+ if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) {
+ report($line, "synopsis style and definition list item not backquoted");
+ }
}
--
gitgitgadget
next prev parent reply other threads:[~2025-08-05 19:10 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 ` Jean-Noël Avila via GitGitGadget [this message]
2025-08-11 20:53 ` [PATCH v3 0/6] Introduce more doc linting Jean-Noël Avila via GitGitGadget
2025-08-11 20:53 ` [PATCH v3 1/6] doc: test linkgit macros for well-formedness Jean-Noël Avila via GitGitGadget
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=d57478ea5cd8fb6166dddcea30e72a42df79ba2a.1754421046.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=jn.avila@free.fr \
/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).