Git development
 help / color / mirror / Atom feed
From: Todd Zullinger <tmz@pobox.com>
To: "Jean-Noël Avila" <jn.avila@free.fr>
Cc: git@vger.kernel.org
Subject: [PATCH 1/3] doc lint: match commands as well as options for synopsis style check
Date: Sat, 12 Sep 2026 15:15:00 -0400	[thread overview]
Message-ID: <20260912191509.844954-2-tmz@pobox.com> (raw)
In-Reply-To: <20260912191509.844954-1-tmz@pobox.com>

Both `--option::` and `command::` should be backtick-quoted with the new
synopsis style.  Remove the requirement for a leading `-` from the regex
which scans for these patterns.

Avoid matching lines like `linkgit:git-diff[1]::` by replacing `.*` with
`[^:]*` in the regex.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
 Documentation/lint-documentation-style.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/lint-documentation-style.perl b/Documentation/lint-documentation-style.perl
index d7ab732293..6eece11bdc 100755
--- a/Documentation/lint-documentation-style.perl
+++ b/Documentation/lint-documentation-style.perl
@@ -24,8 +24,8 @@ sub report {
 	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");
+	if (($line =~ /^([-a-z][^:]*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) {
+		report($line, "synopsis style and definition list item not backquoted");
 	}
 }
 
-- 
2.56.0.rc0


  reply	other threads:[~2026-09-12 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 19:14 [PATCH 0/3] doc lint fixes for pack-refs and refs Todd Zullinger
2026-09-12 19:15 ` Todd Zullinger [this message]
2026-09-12 19:15 ` [PATCH 2/3] doc/pack-refs: convert synopsis and options to new style Todd Zullinger
2026-09-12 19:15 ` [PATCH 3/3] doc/refs: backtick-quote commands and options consistently Todd Zullinger
2026-09-13 10:26 ` [PATCH 0/3] doc lint fixes for pack-refs and refs Jean-Noël AVILA
2026-09-13 14:14   ` Todd Zullinger

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=20260912191509.844954-2-tmz@pobox.com \
    --to=tmz@pobox.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