Thread (16 messages) flat view 16 messages, 3 authors, 17h ago
HOTtoday

Revision v1 of 3 in this series.

Revisions (3)
  1. v1 current
  2. v1 [diff vs current]
  3. v1 [diff vs current]

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

From: Todd Zullinger <hidden>
Date: 2026-09-12 19:15:35
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help