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

[lintian] 01/01: checks/debhelper.pm: Rewrite two essentialy-identical if statements as a single List::MoreUtils::any statement.



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 47ea276c0a316a475be3f6625b77108e35314537
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Sep 22 20:05:39 2017 +0100

    checks/debhelper.pm: Rewrite two essentialy-identical if statements as a single List::MoreUtils::any statement.
---
 checks/debhelper.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 541b0f8..e8b70a9 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -23,6 +23,7 @@ use strict;
 use warnings;
 use autodie;
 
+use List::MoreUtils qw(any);
 use Text::Levenshtein qw(distance);
 
 use Lintian::Data;
@@ -433,8 +434,8 @@ sub run {
 
     while (my ($dep, $command) = each %missingbdeps) {
         next if $dep eq 'debhelper'; #handled above
-        next if $dep eq 'autotools-dev' and $level >= 10;
-        next if $dep eq 'dh-strip-nondeterminism' and $level >= 10;
+        next if $level >= 10 and any { $_ eq $dep }
+          qw(autotools-dev dh-strip-nondeterminism);
         tag 'missing-build-dependency-for-dh_-command', "$command => $dep"
           unless ($bdepends_noarch->implies($dep));
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: