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

[SCM] Debian package checker branch, master, updated. 2.4.3-212-g097fd4d



The following commit has been merged in the master branch:
commit 097fd4defa69b0277289611fe68cfdf014bf930f
Author: Niels Thykier <niels@thykier.net>
Date:   Mon Jan 31 15:57:38 2011 +0100

    PerlCritic cleaned checks/{md5sums,nmu,description}
    
    Also removed redundant arguments to tag()

diff --git a/checks/description b/checks/description
index fca8004..30b1d30 100644
--- a/checks/description
+++ b/checks/description
@@ -58,24 +58,24 @@ unless (defined $synopsis) {
 $description = '' unless defined($description);
 
 if ($synopsis =~ m/^\s*$/) {
-    tag 'description-synopsis-is-empty', '';
+    tag 'description-synopsis-is-empty';
 } else {
     if ($synopsis =~ m/^\Q$pkg\E\b/i) {
-	tag 'description-starts-with-package-name', '';
+	tag 'description-starts-with-package-name';
     }
     if ($synopsis =~ m/^(an?|the)\s/i) {
-	tag 'description-synopsis-starts-with-article', '';
+	tag 'description-synopsis-starts-with-article';
     }
     if ($synopsis =~ m/(?<!etc)\.\s*$/i) {
-	tag 'description-synopsis-might-not-be-phrased-properly', '';
+	tag 'description-synopsis-might-not-be-phrased-properly';
     }
     if ($synopsis =~ m/\t/) {
-	tag 'description-contains-tabs', '' unless $tabs++;
+	tag 'description-contains-tabs' unless $tabs++;
     }
     if ($synopsis =~ m/^missing\s*$/i) {
-	tag 'description-is-debmake-template', '' unless $template++;
+	tag 'description-is-debmake-template' unless $template++;
     } elsif ($synopsis =~ m/<insert up to 60 chars description>/) {
-	tag "description-is-dh_make-template", '' unless $template++;
+	tag 'description-is-dh_make-template' unless $template++;
     }
 
     # We have to decode into UTF-8 to get the right length for the length
@@ -94,12 +94,12 @@ foreach (split /\n/, $description) {
 	my $firstline = lc $_;
 	my $lsyn = lc $synopsis;
 	if ($firstline =~ /^\Q$lsyn\E$/) {
-	    tag 'description-synopsis-is-duplicated', '';
+	    tag 'description-synopsis-is-duplicated';
 	} else {
 	    $firstline =~ s/[^a-zA-Z0-9]+//g;
 	    $lsyn =~ s/[^a-zA-Z0-9]+//g;
 	    if ($firstline eq $lsyn) {
-		tag 'description-synopsis-is-duplicated', '';
+		tag 'description-synopsis-is-duplicated';
 	    }
 	}
     }
@@ -107,15 +107,15 @@ foreach (split /\n/, $description) {
     $lines++;
 
     if (m/^ \.\s*\S/o) {
-	tag 'description-contains-invalid-control-statement', '';
+	tag 'description-contains-invalid-control-statement';
     } elsif (m/^ [\-\*]/o) {
 	# Print it only the second time.  Just one is not enough to be sure that
 	# it's a list, and after the second there's no need to repeat it.
-	tag 'possible-unindented-list-in-extended-description', '' if $unindented_list++ == 2;
+	tag 'possible-unindented-list-in-extended-description' if $unindented_list++ == 2;
     }
 
     if (m/\t/o) {
-	tag 'description-contains-tabs', '' unless $tabs++;
+	tag 'description-contains-tabs' unless $tabs++;
     }
 
     if (m,^\s*Homepage: <?https?://,i) {
@@ -157,17 +157,17 @@ foreach (split /\n/, $description) {
     if ($lines == 1) {
 	# checks for the first line of the extended description:
 	if (m/^ \s/o) {
-	    tag 'description-starts-with-leading-spaces', '';
+	    tag 'description-starts-with-leading-spaces';
 	}
 	if (m/^\s*missing\s*$/oi) {
-	    tag 'description-is-debmake-template', '' unless $template++;
+	    tag 'description-is-debmake-template' unless $template++;
 	} elsif (m/<insert long description, indented with spaces>/) {
-	    tag "description-is-dh_make-template", '' unless $template++;
+	    tag 'description-is-dh_make-template' unless $template++;
 	}
     }
 
     if (length(decode('utf-8', $_)) > 80) {
-	tag 'extended-description-line-too-long', '';
+	tag 'extended-description-line-too-long';
     }
 }
 
diff --git a/checks/md5sums b/checks/md5sums
index 11df4ed..9e6e20a 100644
--- a/checks/md5sums
+++ b/checks/md5sums
@@ -20,6 +20,7 @@
 
 package Lintian::md5sums;
 use strict;
+use warnings;
 
 use Lintian::Tags qw(tag);
 use Util;
@@ -29,7 +30,7 @@ sub run {
 my $pkg = shift;
 my $type = shift;
 
-my $control = "control/md5sums";
+my $control = 'control/md5sums';
 
 my %control_entry;
 my %info_entry;
@@ -49,8 +50,8 @@ while (<C>) {
 close(C);
 
 # read in conffiles
-if (-f "control/conffiles") {
-    open(C, '<', "control/conffiles")
+if (-f 'control/conffiles') {
+    open(C, '<', 'control/conffiles')
 	or fail("cannot open control file conffiles: $!");
     while (<C>) {
 	chop;
@@ -78,7 +79,7 @@ unless (-f $control) {
 	}
     }
 
-    tag 'no-md5sums-control-file', '' unless $only_conffiles;
+    tag 'no-md5sums-control-file' unless $only_conffiles;
     return 0;
 }
 
diff --git a/checks/nmu b/checks/nmu
index a7b333a..6430f94 100644
--- a/checks/nmu
+++ b/checks/nmu
@@ -48,7 +48,7 @@ my $changelog_mentions_team_upload = 0;
 # This isn't really an NMU check, but right now no other check looks at
 # debian/changelog in source packages.  Catch a debian/changelog file that's a
 # symlink.
-if (-l "debfiles/changelog") {
+if (-l 'debfiles/changelog') {
     tag 'changelog-is-symlink', '';
     return 0;
 }

-- 
Debian package checker


Reply to: