[SCM] Debian package checker branch, master, updated. 2.1.6-19-g6928edf
The following commit has been merged in the master branch:
commit 2beb9bdd312a25f88cc40d44303b7d96d140dd1e
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sat Jan 10 17:35:32 2009 -0600
Initial support for --pedantic tags
Signed-off-by: Raphael Geissert <atomo64@gmail.com>
diff --git a/frontend/lintian b/frontend/lintian
index 2a9c957..04f3154 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -47,6 +47,7 @@ my @debug;
my $check_everything = 0; #flag for -a|--all switch
my $lintian_info = 0; #flag for -i|--info switch
our $display_experimentaltags = 0; #flag for -E|--display-experimental switch
+our $display_pedantictags = 0; #flag for --pedantic switch
my $unpack_level = undef; #flag for -l|--unpack-level switch
our $no_override = 0; #flag for -o|--no-override switch
our $show_overrides = 0; #flag for --show-overrides switch
@@ -145,6 +146,7 @@ Behaviour options:
-i, --info give detailed info about tags
-I, --display-info display "I:" tags (normally suppressed)
-E, --display-experimental display "X:" tags (normally suppressed)
+ --pedantic display "P:" tags (normally suppressed)
-L, --display-level display tags with the specified level
--display-source X restrict displayed tags by source
-l X, --unpack-level X set default unpack level to X
@@ -415,6 +417,7 @@ my %opthash = ( # ------------------ actions
"info|i" => \$lintian_info,
"display-info|I" => \&display_infotags,
"display-experimental|E" => \$display_experimentaltags,
+ "pedantic" => \$display_pedantictags,
"display-level|L=s" => \&record_display_level,
"display-source=s" => \&record_display_source,
"unpack-level|l=i" => \$unpack_level,
@@ -682,6 +685,7 @@ shift(@l_secs);
map { $_->{'script'} = 'lintian'; Tags::add_tag($_) } @l_secs;
$Tags::show_experimental = $display_experimentaltags;
+$Tags::show_pedantic = $display_pedantictags;
$Tags::show_overrides = $show_overrides;
%Tags::display_level = %display_level;
%Tags::display_source = %display_source;
diff --git a/lib/Tags.pm b/lib/Tags.pm
index 7ee65bb..86ca475 100644
--- a/lib/Tags.pm
+++ b/lib/Tags.pm
@@ -30,6 +30,7 @@ our @EXPORT = qw(tag);
use Lintian::Output;
# configuration variables and defaults
+our $show_pedantic = 0;
our $show_experimental = 0;
our $show_overrides = 0;
our %display_level;
@@ -64,11 +65,12 @@ my %info;
my $current;
# Possible Severity: and Certainty: values, sorted from lowest to highest.
-our @severity_list = qw(wishlist minor normal important serious);
+our @severity_list = qw(pedantic wishlist minor normal important serious);
our @certainty_list = qw(wild-guess possible certain);
# Map Severity/Certainty levels to E|W|I codes.
my %codes = (
+ 'pedantic' => { 'wild-guess' => 'P', 'possible' => 'P', 'certain' => 'P' },
'wishlist' => { 'wild-guess' => 'I', 'possible' => 'I', 'certain' => 'I' },
'minor' => { 'wild-guess' => 'I', 'possible' => 'I', 'certain' => 'W' },
'normal' => { 'wild-guess' => 'I', 'possible' => 'W', 'certain' => 'W' },
@@ -297,6 +299,9 @@ sub display_tag {
$level = 1;
}
+ # Pedantic is just a pseudo severity, skip level checks
+ $level = 1 if ($severity eq 'pedantic' and $show_pedantic);
+
$tag_info->{'display'} = $level;
return $level if not keys %display_source;
@@ -310,6 +315,7 @@ sub display_tag {
sub skip_print {
my ( $tag_info ) = @_;
return 1 if exists $tag_info->{experimental} && !$show_experimental;
+ return 1 if $tag_info->{severity} eq 'pedantic' && !$show_pedantic;
return 1 if $tag_info->{overridden}{override} && !$show_overrides;
return 1 if not display_tag( $tag_info );
return 0;
--
Debian package checker
Reply to: