From: Sébastien Guimmara Date: Sat, 09 May 2015 17:17:36 GMT Subject: [PATCH v5 6/6] cmd-list.perl: ignore all lines until [commands] Message-ID: <1431191856-10949-7-git-send-email-sebastien.guimmara@gmail.com> In-Reply-To: <1431191856-10949-1-git-send-email-sebastien.guimmara@gmail.com> command-list.txt contains a [common] block that should be ignored by the Documentation checker cmd-list.perl. Filter out this block before the actual processing of the command list. Signed-off-by: Sébastien Guimmara --- Documentation/cmd-list.perl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index 04f9977..d581378 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -38,8 +38,14 @@ sub format_one { } } +my @filtered = (); +while (<>) +{ + push (@filtered, $_) unless 1../^\[commands\]/; +} + my %cmds = (); -for (sort <>) { +for (sort @filtered) { next if /^#/; chomp; -- 2.4.0