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

[PATCH 1/3] doc lint: match commands as well as options for synopsis style check

From
Todd Zullinger <tmz@pobox.com>
Date
Sep 12, 2026, 19:15 UTC
Message-ID
<20260912191509.844954-2-tmz@pobox.com>
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
Previous: Todd ZullingerNext: Todd Zullinger
Message 2 of 16 in “doc lint fixes for pack-refs and refs”
  1. 0/3 doc lint fixes for pack-refs and refsTodd Zullinger, Sep 12, 2026
  2. 1/3 doc lint: match commands as well as options for synopsis style checkTodd Zullinger, Sep 12, 2026
  3. 2/3 doc/pack-refs: convert synopsis and options to new styleTodd Zullinger, Sep 12, 2026
  4. 3/3 doc/refs: backtick-quote commands and options consistentlyTodd Zullinger, Sep 12, 2026
  5. Jean-Noël AVILASep 13, 2026
  6. Todd ZullingerSep 13, 2026
  7. 0/2 doc lint fixes for pack-refs and refsTodd Zullinger, Sep 14, 2026
  8. 1/2 doc/pack-refs: convert synopsis and options to new styleTodd Zullinger, Sep 14, 2026
  9. Junio C HamanoSep 14, 2026
  10. Todd ZullingerSep 14, 2026
  11. Todd ZullingerSep 15, 2026
  12. 2/2 doc/refs: backtick-quote commands and options consistentlyTodd Zullinger, Sep 14, 2026
  13. 1/2 doc/pack-refs: convert synopsis and options to new styleTodd Zullinger, Sep 15, 2026
  14. 0/2 doc lint fixes for pack-refs and refsTodd Zullinger, Sep 15, 2026
  15. Junio C HamanoSep 15, 2026
  16. 2/2 doc/refs: backtick-quote commands and options consistentlyTodd Zullinger, Sep 15, 2026

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.