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

[SCM] Debian package checker branch, master, updated. 2.5.11-230-g758c79a



The following commit has been merged in the master branch:
commit 758c79a99055c9b047c66bb90dbf4f66735b643b
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Apr 7 19:16:51 2013 +0200

    Avoid using both low and high precedence bool ops together
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/.perlcriticrc b/.perlcriticrc
index ca535e1..96f207b 100644
--- a/.perlcriticrc
+++ b/.perlcriticrc
@@ -8,7 +8,7 @@ severity = 1
 # Work based on a whitelist
 only = 1
 # Our whitelist (ignores severity):
-include = ExplicitReturnUndef GlobFunction NegativeIndices PrivateVars UselessInitialization MatchVars NumberSeparators NullStatements LongChainsOfMethodCalls UseStrict UseWarnings EndWithOne ConditionalUseStatements PackageMatchesPodName JoinedReadline UnreachableCode TrailingWhitespace InterpolationOfLiterals ImplicitNewlines CommaSeparatedStatements UseStrict UseWarnings UnusedVariables UnusedCapture TwoArgOpen ProhibitHardTabs MismatchedOperators IndirectSyntax Modules:: BuiltinFunctions:: ClassHierarchies::
+include = ExplicitReturnUndef GlobFunction NegativeIndices PrivateVars UselessInitialization MatchVars NumberSeparators NullStatements LongChainsOfMethodCalls UseStrict UseWarnings EndWithOne ConditionalUseStatements PackageMatchesPodName JoinedReadline UnreachableCode TrailingWhitespace InterpolationOfLiterals ImplicitNewlines CommaSeparatedStatements UseStrict UseWarnings UnusedVariables UnusedCapture TwoArgOpen ProhibitHardTabs MismatchedOperators IndirectSyntax Modules:: BuiltinFunctions:: ClassHierarchies:: CommaSeparatedStatements QuotesAsQuotelikeOperatorDelimiters MixedBooleanOperators
 #include = MixedBooleanOperators InteractiveTest UpperCaseHeredoc ReusedNames PackageVars ConditionalDeclarations SingleCharAlternation FixedStringMatches ConditionalUseStatements QuotedWordLists
 
 exclude = RequireFilenameMatchesPackage RequireVersionVar ProhibitExcessMainComplexity ProhibitStringySplit ComplexMappings StringyEval
@@ -46,3 +46,7 @@ allow_if_string_contains_single_quote = 1
 [ValuesAndExpressions::ProhibitCommaSeparatedStatements]
 allow_last_statement_to_be_comma_separated_in_map_and_grep = 1
 
+[-ValuesAndExpressions::ProhibitConstantPragma]
+
+[Variables::RequireLocalizedPunctuationVars]
+allow = %ENV %SIG $!
diff --git a/checks/fields b/checks/fields
index ef1ac32..e435734 100644
--- a/checks/fields
+++ b/checks/fields
@@ -695,7 +695,7 @@ if (($type eq 'binary') || ($type eq 'udeb')) {
 
                 tag 'depends-on-packaging-dev', $field
                     if (($field =~ /^(?:pre-)?depends$/ || $field eq 'recommends') && $d_pkg eq 'packaging-dev'
-                        && not $info->is_pkg_class ('any-meta'));
+                        && !$info->is_pkg_class('any-meta'));
 
                 tag 'needlessly-depends-on-awk', $field
                     if ($d_pkg eq 'awk' && ! $d_version->[0] && &$is_dep_field($field) && $pkg ne 'base-files');
diff --git a/checks/files b/checks/files
index 7fcb5b5..6a76f5f 100644
--- a/checks/files
+++ b/checks/files
@@ -331,7 +331,7 @@ foreach my $file ($info->sorted_index) {
             tag 'package-modifies-ld.so-search-path', $file;
         }
         #----------------- /etc/modprobe.d
-        elsif ($file =~ m,^etc/modprobe\.d/(.+)$, and $1 !~ m,\.conf$, and !$index_info->is_dir) {
+        elsif ($file =~ m,^etc/modprobe\.d/(.+)$, and $1 !~ m,\.conf$, and not $index_info->is_dir) {
             tag 'non-conf-file-in-modprobe.d', $file;
         }
         #---------------- /etc/opt
@@ -837,7 +837,7 @@ foreach my $file ($info->sorted_index) {
         # library, we also skip it.  (In case you hadn't guessed; liblicense)
         my $fileinfo = $info->file_info ($file);
         tag 'extra-license-file', $file
-            unless $fileinfo && ($fileinfo =~ m/^[^,]*\bELF\b/) or ($fileinfo =~ m/\bcurrent ar archive\b/);
+            unless $fileinfo and ($fileinfo =~ m/^[^,]*\bELF\b/) or ($fileinfo =~ m/\bcurrent ar archive\b/);
     }
 
     # ---------------- .devhelp2? files
diff --git a/checks/scripts b/checks/scripts
index e859437..2cbd3c4 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -235,7 +235,7 @@ for my $filename (sort keys %{$info->scripts}) {
 
     # no checks necessary at all for scripts in /usr/share/doc/
     # unless they are examples
-    next if $in_docs and !$in_examples;
+    next if $in_docs and not $in_examples;
 
     my ($base) = $interpreter =~ m,([^/]*)$,;
 
@@ -247,16 +247,16 @@ for my $filename (sort keys %{$info->scripts}) {
     # Skip files that have the #! line, but are not executable and do not have
     # an absolute path and are not in a bin/ directory (/usr/bin, /bin etc)
     # They are probably not scripts after all.
-    next if ($filename !~ m,(?:bin/|etc/init\.d/), and !$executable{$filename}
-             and !$is_absolute and !$in_examples);
+    next if ($filename !~ m,(?:bin/|etc/init\.d/), && !$executable{$filename}
+             && !$is_absolute && !$in_examples);
 
     # Example directories sometimes contain Perl libraries, and some people
     # use initial lines like #!perl or #!python to provide editor hints, so
     # skip those too if they're not executable.  Be conservative here, since
     # it's not uncommon for people to both not set examples executable and not
     # fix the path and we want to warn about that.
-    next if ($filename =~ /\.pm\z/ and !$executable{$filename}
-             and !$is_absolute and $in_examples);
+    next if ($filename =~ /\.pm\z/ && !$executable{$filename}
+             && !$is_absolute && $in_examples);
 
     if ($interpreter eq '') {
         script_tag('script-without-interpreter', $filename);
@@ -285,7 +285,7 @@ for my $filename (sort keys %{$info->scripts}) {
         if (($base eq 'csh' or $base eq 'tcsh')
             and $executable{$filename}
             and $filename !~ m,^etc/csh/login\.d/,)
-            and !$in_docs;
+            and not $in_docs;
 
     $path = $info->unpacked($filename);
     # Syntax-check most shell scripts, but don't syntax-check scripts that end
@@ -293,7 +293,7 @@ for my $filename (sort keys %{$info->scripts}) {
     # up on the patch itself.
     if ($base =~ /^$known_shells_regex$/) {
         if (-x $interpreter
-            and ! script_is_evil_and_wrong($path)
+            and not script_is_evil_and_wrong($path)
             and $filename !~ m,\.dpatch$,
             and $filename !~ m,\.erb$,
             # exclude some shells. zsh -n is broken, see #485885
@@ -361,7 +361,7 @@ for my $filename (sort keys %{$info->scripts}) {
     # If we found the interpreter and the script is executable, check
     # dependencies.  This should be the last thing we do in the loop so that
     # we can use next for an early exit and reduce the nesting.
-    next unless ($data && $executable{$filename} and !$in_docs);
+    next unless ($data and $executable{$filename} and not $in_docs);
     if (!$versioned) {
         my $depends = $data->[1];
         if (not defined $depends) {
@@ -616,7 +616,7 @@ while (<SCRIPTS>) {
             }
             # if cat_string is set, we are in a HERE document and need not
             # check for things
-            if ($cat_string eq '' and $checkbashisms and !$within_another_shell) {
+            if ($cat_string eq '' && $checkbashisms && !$within_another_shell) {
                 my $found = 0;
                 my $match = '';
 
@@ -804,7 +804,7 @@ while (<SCRIPTS>) {
         } else {
             for my $rule (@depends_needed) {
                 my ($package, $regex) = @$rule;
-                if ($pkg ne $package and /$regex/ and ! $warned{$package}) {
+                if ($pkg ne $package and /$regex/ and not $warned{$package}) {
                     if (m,-x\s+\S*$regex, or m,(?:which|type)\s+$regex, or m,command\s+.*?$regex,) {
                         $warned{$package} = 1;
                     } elsif (!/\|\|\s*true\b/) {
@@ -831,7 +831,7 @@ while (<SCRIPTS>) {
             tag 'maintainer-script-uses-dpkg-status-directly', $file;
         }
         if (m,$LEADIN(?:/usr/sbin/)?dpkg-divert\s, && ! /--(?:help|list|truename|version)/) {
-            if (/--local/ or !/--package/) {
+            if (/--local/ || !m/--package/) {
                 tag 'package-uses-local-diversion', "$file:$.";
             }
             my $mode = /--remove/ ? 'remove' : 'add';
diff --git a/collection/scripts b/collection/scripts
index 4646414..27c31d8 100755
--- a/collection/scripts
+++ b/collection/scripts
@@ -74,7 +74,7 @@ open SCRIPTS, '>', "$dir/control-scripts"
 
 opendir(my $dirfd, "$dir/control");
 for my $file (readdir($dirfd)) {
-    next if -l "$dir/control/$file" or ! -f _;
+    next if -l "$dir/control/$file" or not -f _;
     open FILE, '<', "$dir/control/$file" or fail "cannot open control/$file: $!";
     if (read(FILE, $magic, 2) and $magic eq '#!') {
         $scriptpath = <FILE>;
diff --git a/lib/Lintian/Lab.pm b/lib/Lintian/Lab.pm
index 18a66ff..0d68e48 100644
--- a/lib/Lintian/Lab.pm
+++ b/lib/Lintian/Lab.pm
@@ -667,7 +667,7 @@ sub create {
 
     $opts = {} unless $opts;
     $mode = $opts->{'mode'} if exists $opts->{'mode'};
-    if ( !$dir or $self->is_temp) {
+    if (not $dir or $self->is_temp) {
         if ($self->is_temp) {
             my $keep = $opts->{'keep-lab'}//0;
             my %topts = ( 'CLEANUP' => !$keep, 'TMPDIR' => 1 );

-- 
Debian package checker


Reply to: