[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Add a --list-tags option to print all tags Lintian knows about. Thanks to Rajendra Gokhale for the suggestion. (Closes: #779675)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 63f08a23a545b54f75e3687413012b3c9806aa55
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Sep 1 21:43:49 2017 +0100

    Add a --list-tags option to print all tags Lintian knows about. Thanks to Rajendra Gokhale for the suggestion. (Closes: #779675)
---
 commands/info.pm     | 11 ++++++++++-
 debian/changelog     |  3 +++
 man/lintian-info.pod |  4 ++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/commands/info.pm b/commands/info.pm
index 8d12ac0..732f2df 100644
--- a/commands/info.pm
+++ b/commands/info.pm
@@ -35,10 +35,11 @@ use Lintian::Profile;
 sub compat();
 
 sub main {
-    my ($annotate, $tags, $help, $prof);
+    my ($annotate, $list_tags, $tags, $help, $prof);
     my (%already_displayed, $profile);
     my %opthash = (
         'annotate|a' => \$annotate,
+        'list-tags|l' => \$list_tags,
         'tags|tag|t' => \$tags,
         'help|h' => \$help,
         'profile=s' => \$prof,
@@ -66,6 +67,7 @@ Usage: $me [log-file...] ...
 
 Options:
     -a, --annotate     display descriptions of tags in Lintian overrides
+    -l, --list-tags    list all tags Lintian knows about
     -t, --tag, --tags  display tag descriptions
     --profile X        use vendor profile X to determine severities
 EOT
@@ -88,6 +90,13 @@ EOT
 
     Lintian::Data->set_vendor($profile);
 
+    if ($list_tags) {
+        foreach my $tag (sort $profile->tags) {
+            print "$tag\n";
+        }
+        exit 0;
+    }
+
     # If tag mode was specified, read the arguments as tags and display the
     # descriptions for each one.  (We don't currently display the severity,
     # although that would be nice.)
diff --git a/debian/changelog b/debian/changelog
index 7be6e33..7957da1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -120,6 +120,9 @@ lintian (2.5.53) UNRELEASED; urgency=medium
   * debian/control:
     + [CL] Mention Debian Policy v4.1.0 in the description.
 
+  * commands/info.pm:
+    + [CL] Add a --list-tags option to print all tags Lintian knows about.
+      Thanks to Rajendra Gokhale for the suggestion.  (Closes: #779675)
   * commands/lintian.pm:
     + [CL] Apply patch from Maia Everett to avoid British spelling when
       using en_US locale.  (Closes: #868897)
diff --git a/man/lintian-info.pod b/man/lintian-info.pod
index 46bafab..8e46e32 100644
--- a/man/lintian-info.pod
+++ b/man/lintian-info.pod
@@ -56,6 +56,10 @@ and search the input for lines formatted like Lintian override
 entries.  For each one that was found, display verbose information
 about that tag.
 
+=item B<-l>, B<--list-tags>
+
+List all tags Lintian knows about in sorted order.
+
 =item B<-h>, B<--help>
 
 Display usage information and exit.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: