All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel-doc: Allow whitespace before comment start
@ 2024-08-29 20:25 Michal Wajdeczko
  2024-09-05 19:56 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Wajdeczko @ 2024-08-29 20:25 UTC (permalink / raw)
  To: linux-doc; +Cc: Michal Wajdeczko, Jonathan Corbet, Rae Moar

There is some existing documentation that is formatted with some
indent at the beginning (like one in include/kunit/visibility.h).

However, such notation is not recognized by the script and attempt
to include that in kernel documentation fails with:

../include/kunit/visibility.h:1: warning: no structured comments found

Change the doc_start regex to also match /** with some whitespaces
at beginning of the line.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Rae Moar <rmoar@google.com>
---
 scripts/kernel-doc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 2791f8195203..6f91b26d63b6 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -246,7 +246,7 @@ my $decl_type;
 # Name of the kernel-doc identifier for non-DOC markups
 my $identifier;
 
-my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
+my $doc_start = '^[ \t]*/\*\*\s*$'; # Allow whitespace before and at end of comment start.
 my $doc_end = '\*/';
 my $doc_com = '\s*\*\s*';
 my $doc_com_body = '\s*\* ?';
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-06 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 20:25 [PATCH] kernel-doc: Allow whitespace before comment start Michal Wajdeczko
2024-09-05 19:56 ` Jonathan Corbet
2024-09-05 22:43   ` Michal Wajdeczko
2024-09-06 13:49     ` Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.