[SCM] Debian package checker branch, master, updated. 2.5.0-rc1-16-ga4d02d1
The following commit has been merged in the master branch:
commit a208b4c3787587367322fbafd495e71cab80e50c
Author: Niels Thykier <niels@thykier.net>
Date: Tue Feb 22 10:15:05 2011 +0100
Removed most of the perlcritic warnings in 3 checks
diff --git a/checks/manpages b/checks/manpages
index 5e03e2e..2943955 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -226,7 +226,7 @@ foreach my $file (@{$info->sorted_index}) {
if ($desc =~ /(\S+)\s+-\s+manual page for \1/i) {
tag 'manpage-has-useless-whatis-entry', $file;
} elsif ($desc =~ /(\S+)\s+-\s+programs? to do something/i) {
- tag "manpage-is-dh_make-template", $file;
+ tag 'manpage-is-dh_make-template', $file;
}
1 while <LEXGROG>;
close LEXGROG;
@@ -325,7 +325,7 @@ foreach my $file (@{$info->sorted_index}) {
if ($path =~ m,/man/man\d/,);
}
tag 'hyphen-used-as-minus-sign', $file, ($hc - 10),
- "more occurrences not shown"
+ 'more occurrences not shown'
if ($hc > 10 && ! $ENV{'LINTIAN_DEBUG'});
}
}
diff --git a/checks/menu-format b/checks/menu-format
index ece7f5b..bc659fb 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -34,6 +34,7 @@
package Lintian::menu_format;
use strict;
+use warnings;
use Lintian::Tags qw(tag);
use Util;
@@ -387,10 +388,10 @@ my $type = shift;
my $info = shift;
my @menufiles;
-opendir (MENUDIR, "menu/lib") or fail("cannot read menu/lib file directory.");
+opendir (MENUDIR, 'menu/lib') or fail('cannot read menu/lib file directory.');
push @menufiles, map { "menu/lib/$_" } readdir(MENUDIR);
closedir MENUDIR;
-opendir (MENUDIR, "menu/share") or fail("cannot read menu/share file directory.");
+opendir (MENUDIR, 'menu/share') or fail('cannot read menu/share file directory.');
push @menufiles, map { "menu/share/$_" } readdir(MENUDIR);
closedir MENUDIR;
@@ -406,9 +407,9 @@ foreach my $file (@{$info->sorted_index}) {
$file =~ m,^usr/share/applications/.*\.desktop$,) {
if ($operm & 0100 or $operm & 010 or $operm & 01) {
- tag 'executable-desktop-file', sprintf("%s %04o",$file,$operm);
+ tag 'executable-desktop-file', sprintf('%s %04o',$file,$operm);
}
- unless ($file =~ m,template,) {
+ unless ($file =~ m,template,o) {
push (@desktop_files, $file);
}
}
@@ -709,12 +710,12 @@ sub VerifyIcon {
return;
}
- my $parse = "XPM header";
+ my $parse = 'XPM header';
my $line;
do { defined ($line = <IN>) or goto parse_error; }
until ($line =~ /\/\*\s*XPM\s*\*\//);
- $parse = "size line";
+ $parse = 'size line';
do { defined ($line = <IN>) or goto parse_error; }
until ($line =~ /"\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)\s*"/);
my $width = $1 + 0;
@@ -869,7 +870,7 @@ sub VerifyCmd {
# allows one, and gksu has the command at the end of its arguments.
my @com = split (' ', $exec);
my $cmd;
- if ($com[0] and $com[0] eq "/usr/sbin/su-to-root") {
+ if ($com[0] and $com[0] eq '/usr/sbin/su-to-root') {
tag 'su-to-root-with-usr-sbin', $location;
}
if ($com[0] and $com[0] =~ m,^(?:/usr/s?bin/)?(su-to-root|gksu|kdesu|sux)$,) {
diff --git a/checks/ocaml b/checks/ocaml
index 408e16f..4e3f683 100644
--- a/checks/ocaml
+++ b/checks/ocaml
@@ -45,7 +45,7 @@ while (<ARINFO>) {
if (/^\.\/([^:]+): (.*)$/) {
my $filename = $1;
my $dirname = dirname($filename);
- foreach (split(" ", $2)) {
+ foreach (split(m/ /o, $2)) {
# Note: a .o may be legitimately in several different .a
$provided_o{"$dirname/$_"} = $filename;
}
--
Debian package checker
Reply to: