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

[SCM] Debian package checker branch, master, updated. 2.5.1-121-g3e3d020



The following commit has been merged in the master branch:
commit 3e3d0202ff1b393b11a6edbb7780023314ec26ec
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jul 17 19:21:29 2011 +0200

    Emit an error if a check tries to issue an unknown tag

diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index 655f92d..9dcf59f 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -251,6 +251,12 @@ sub tag {
     unless ($self->{current}) {
         die "tried to issue tag $tag without starting a file";
     }
+    # Retrieve the tag metadata and display the tag if the configuration
+    # says to display it.
+    my $info = Lintian::Tag::Info->new($tag);
+    unless ($info) {
+        die "tried to issue unknown tag $tag";
+    }
     return if $self->suppressed($tag);
 
     # Clean up @extra and collapse it to a string.  Lintian code
@@ -260,12 +266,6 @@ sub tag {
     my $extra = join(' ', @extra);
     $extra = '' unless defined $extra;
 
-    # Retrieve the tag metadata and display the tag if the configuration
-    # says to display it.
-    my $info = Lintian::Tag::Info->new($tag);
-    unless ($info) {
-        die "tried to issue unknown tag $tag";
-    }
     my $overridden = $self->_check_overrides($tag, $extra);
     $self->_record_stats($tag, $info, $overridden);
     return if (defined($overridden) and not $self->{show_overrides});

-- 
Debian package checker


Reply to: