The following commit has been merged in the master branch: commit 7b2e01ff676fa20dd02183f4a1ac89fcf0f838bf Author: Frans Pop <elen...@planet.nl> Date: Sat Mar 20 18:00:41 2010 -0700
Don't warn about length of short description of text templates For udebs all cases are templates of type "text" that contain text fragments that get dynamically included in other templates at runtime. Because of that specific usage, the length of the short description is not relevant. To avoid these false positives, please add an exception for this warning: - if the template type is "text" AND - the package is a udeb Reasons to request the exception are: - udebs cannot contain lintian exceptions for binary packages (because we don't want them installed in the D-I environment) - we *do* want the warning for other template types than "text" Also change the name of the local variable (template) 'type' which currently shadows the higher level (package) 'type' variable. diff --git a/checks/debconf b/checks/debconf index ead94f5..f1b99a9 100644 --- a/checks/debconf +++ b/checks/debconf @@ -290,10 +290,10 @@ foreach my $template (@templates) { } else { ($short, $extended) = ('', ''); } - my $type = $template->{type} || ''; + my $ttype = $template->{type} || ''; unless ($short =~ /for internal use/i) { - my $isprompt = grep { $_ eq $type } qw(string password); - my $isselect = grep { $_ eq $type } qw(select multiselect); + my $isprompt = grep { $_ eq $ttype } qw(string password); + my $isselect = grep { $_ eq $ttype } qw(select multiselect); if ($isprompt) { if ($short && ($short !~ m/:$/ || $short =~ m/^(what|who|when|where|which|how)/i)) { tag "malformed-prompt-in-templates", $template->{template}; @@ -304,7 +304,7 @@ foreach my $template (@templates) { tag "using-imperative-form-in-templates", $template->{template}; } } - if ($type eq 'boolean') { + if ($ttype eq 'boolean') { if ($short !~ /\?/) { tag "malformed-question-in-templates", $template->{template}; } @@ -312,19 +312,20 @@ foreach my $template (@templates) { if (defined ($extended) && $extended =~ /[^\?]\?(\s+|$)/) { tag "using-question-in-extended-description-in-templates", $template->{template}; } - if ($type eq 'note') { + if ($ttype eq 'note') { if ($short =~ /[.?;:]$/) { tag "malformed-title-in-templates", $template->{template}; } } if (length ($short) > 75) { - tag "too-long-short-description-in-templates", $template->{template}; + tag "too-long-short-description-in-templates", $template->{template} + unless $type eq 'udeb' && $ttype eq 'text'; } if (defined $template->{description}) { if ($template->{description} =~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us)(\Z|\s)/) { tag "using-first-person-in-templates", $template->{template}; } - if ($template->{description} =~ /[ \'\"]yes[ \'\",;.]/i and $type eq 'boolean') { + if ($template->{description} =~ /[ \'\"]yes[ \'\",;.]/i and $ttype eq 'boolean') { tag "making-assumptions-about-interfaces-in-templates", $template->{template}; } } -- Debian package checker -- To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1nt9a4-0005br...@alioth.debian.org