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

[lintian] 03/05: application-not-library Add ?: to all unused capture groups in regexes



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

abe pushed a commit to branch ppt-lc-mover
in repository lintian.

commit b129a12d5dc968cd2579e043f297939e2fe8e504
Author: Axel Beckert <abe@deuxchevaux.org>
Date:   Tue Aug 11 16:09:01 2015 +0200

    application-not-library Add ?: to all unused capture groups in regexes
    
    Issue found by nthykier.
---
 checks/application-not-library.pm | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/checks/application-not-library.pm b/checks/application-not-library.pm
index 1508b6c..9bedd6c 100644
--- a/checks/application-not-library.pm
+++ b/checks/application-not-library.pm
@@ -30,18 +30,18 @@ sub run {
     my ($pkg, $type, $info, $proc, $group) = @_;
 
     return if # Big exception list for all tags
-      $pkg =~ /^perl(-base)?$/                    or # perl itself
-      $pkg =~ /^ruby[\d.]*$/                      or # ruby itself
-      $pkg =~ /^python[\d.]*(-dev|-minimal)?$/    or # python itself
-      $pkg =~ /^cpan(plus|minus)$/                or # cpan package managers
-      $pkg =~ /^libmodule-.*-perl$/               or # perl module tools
-      $pkg =~ /^libdevel-.*-perl$/                or # perl debugging tools
-      $pkg =~ /^libperl.*-perl$/                  or # perl-handling tools
-      $pkg =~ /^libtest-.*-perl$/                 or # perl testing tools
-      $pkg =~ /^python[\d.]*-(stdeb|setuptools)$/ or # python packaging stuff
-      $pkg =~ /^gem2deb/                          or # ruby packaging stuff
-      $pkg =~ /^xulrunner/                        or # rendering engine
-      $pkg =~ /^lib.*-(utils|tools|bin|dev)/      or # generic library helpers
+      $pkg =~ /^perl(?:-base)?$/                    or # perl itself
+      $pkg =~ /^ruby[\d.]*$/                        or # ruby itself
+      $pkg =~ /^python[\d.]*(?:-dev|-minimal)?$/    or # python itself
+      $pkg =~ /^cpan(?:plus|minus)$/                or # cpan package managers
+      $pkg =~ /^libmodule-.*-perl$/                 or # perl module tools
+      $pkg =~ /^libdevel-.*-perl$/                  or # perl debugging tools
+      $pkg =~ /^libperl.*-perl$/                    or # perl-handling tools
+      $pkg =~ /^libtest-.*-perl$/                   or # perl testing tools
+      $pkg =~ /^python[\d.]*-(?:stdeb|setuptools)$/ or # python packaging stuff
+      $pkg =~ /^gem2deb/                            or # ruby packaging stuff
+      $pkg =~ /^xulrunner/                          or # rendering engine
+      $pkg =~ /^lib.*-(?:utils|tools|bin|dev)/      or # generic helpers
       any { $pkg eq $_ } qw(rake bundler coderay kdelibs-bin); # whitelist
 
     my @programs = ();
@@ -62,8 +62,8 @@ sub run {
     return unless @programs;
 
     # Check for library style package names
-    if ($pkg =~ /^lib(.+)-perl$|^ruby-|^python[\d.]*-/) {
-        if ($pkg =~ /^libapp(.+)-perl$/) {
+    if ($pkg =~ /^lib(?:.+)-perl$|^ruby-|^python[\d.]*-/) {
+        if ($pkg =~ /^libapp(?:.+)-perl$/) {
             tag('libapp-perl-package-name', @programs);
         } else {
             tag('library-package-name-for-application', @programs);

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


Reply to: