From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759962AbYDBWv7 (ORCPT ); Wed, 2 Apr 2008 18:51:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757198AbYDBWvv (ORCPT ); Wed, 2 Apr 2008 18:51:51 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:60254 "EHLO rgminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757152AbYDBWvu (ORCPT ); Wed, 2 Apr 2008 18:51:50 -0400 Date: Wed, 2 Apr 2008 15:46:34 -0700 From: Randy Dunlap To: lkml Cc: akpm Subject: [PATCH] kernel-doc: detect trailing kernel-doc line trash Message-Id: <20080402154634.9466ea6a.randy.dunlap@oracle.com> Organization: Oracle Linux Eng. X-Mailer: Sylpheed 2.4.7 (GTK+ 2.8.10; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap Print a warning when a kernel-doc comment block ends with text on the same line as the ending comment characters, e.g.: * this text is lost. */ Signed-off-by: Randy Dunlap --- scripts/kernel-doc | 5 +++++ 1 file changed, 5 insertions(+) --- lin2625-rc8-kdoc.orig/scripts/kernel-doc +++ lin2625-rc8-kdoc/scripts/kernel-doc @@ -1950,6 +1950,11 @@ sub process_file($) { $section = $section_default; $contents = ""; } + # look for doc_com + + doc_end: + if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') { + print STDERR "Warning(${file}:$.): suspicious ending line: $_"; + ++$warnings; + } $prototype = ""; $state = 3;