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

[SCM] Debian package checker branch, master, updated. 2.5.14-12-gf69ab69



The following commit has been merged in the master branch:
commit f69ab69530029275e3153fc7907ffa9bc59cab4c
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jun 30 11:07:42 2013 +0200

    checks/*.pm: Add (and correct) final returns
    
    Our own documentation recommends that the run sub of checks should
    return an undefined value.  Ensure the official checks comply with
    this and at the same time, add missing "final return" to all other
    subs in check files.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/apache2.pm b/checks/apache2.pm
index 2eddad5..b7f4041 100644
--- a/checks/apache2.pm
+++ b/checks/apache2.pm
@@ -88,6 +88,7 @@ sub run {
             check_maintainer_scripts ($info);
         }
     }
+    return;
 }
 
 sub check_web_application_package {
@@ -119,7 +120,7 @@ sub check_web_application_package {
     if (defined $info->index ($file)) {
         inspect_conf_file ($info, $pkgtype, $file);
     }
-
+    return;
 }
 
 sub check_module_package {
@@ -168,7 +169,7 @@ sub check_module_package {
     if (defined $info->index ($conf_file)) {
         inspect_conf_file ($info, 'mods', $conf_file);
     }
-
+    return;
 }
 
 
@@ -214,6 +215,7 @@ sub check_maintainer_scripts {
     }
 
     close($fd);
+    return;
 }
 
 
@@ -248,7 +250,7 @@ sub inspect_conf_file {
 
     }
     close($fd);
-
+    return;
 }
 
 1;
diff --git a/checks/binaries.pm b/checks/binaries.pm
index b59cdba..924ebc8 100644
--- a/checks/binaries.pm
+++ b/checks/binaries.pm
@@ -490,6 +490,7 @@ if ($uses_numpy_c_abi and $pkg ) {
             $pkg =~ m,^python3?-numpy$,;
 }
 
+return;
 }
 
 1;
diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index 32504b3..17dc0b7 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -48,7 +48,7 @@ my @doc_files;
 my %file_info;
 
 # skip packages which have a /usr/share/doc/$pkg -> foo symlink
-return 0 if $info->index ("usr/share/doc/$pkg") and
+return if $info->index("usr/share/doc/$pkg") and
     $info->index ("usr/share/doc/$pkg")->is_symlink;
 
 
@@ -222,13 +222,13 @@ my $dchpath = $info->lab_data_path ('changelog');
 # such symlinks, so their profile will suppress this tag.
 if (-l $dchpath) {
     tag 'debian-changelog-file-is-a-symlink';
-    return 0;
+    return;
 }
 
 # Bail at this point if the changelog file doesn't exist.  We will have
 # already warned about this.
 unless (-f $dchpath) {
-    return 0;
+    return;
 }
 
 # check that changelog is UTF-8 encoded
@@ -378,6 +378,7 @@ if (@entries) {
                    $group->info->spelling_exceptions);
 }
 
+return;
 }
 
 # read the changelog itself and check for some issues we cannot find
diff --git a/checks/changes-file.pm b/checks/changes-file.pm
index f0214b9..ce0fd8d 100644
--- a/checks/changes-file.pm
+++ b/checks/changes-file.pm
@@ -38,7 +38,7 @@ my ($pkg, undef, $info) = @_;
 # Tag the file and skip remaining processing.
 if (!$info->field('format')) {
     tag 'malformed-changes-file';
-    return 0;
+    return;
 }
 
 # Description is mandated by dak, but only makes sense if binary
@@ -134,6 +134,7 @@ foreach my $file (keys %$files) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/conffiles.pm b/checks/conffiles.pm
index 965f256..1b127d6 100644
--- a/checks/conffiles.pm
+++ b/checks/conffiles.pm
@@ -99,6 +99,7 @@ foreach my $file ($info->sorted_index) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/control-file.pm b/checks/control-file.pm
index b9a41ed..cf56840 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -265,6 +265,7 @@ for my $i (0 .. $#descriptions) {
     }
 }
 
+return;
 }
 
 
@@ -319,6 +320,7 @@ sub check_dev_depends {
             }
         }
     }
+    return;
 }
 
 # Checks for duplicates in a relation, for missing separators and
@@ -353,7 +355,7 @@ sub check_relation {
         tag 'obsolete-relation-form-in-source', 'in', $pkg,
             "$field: $1";
     }
-
+    return;
 }
 
 
diff --git a/checks/control-files.pm b/checks/control-files.pm
index 3118747..b5e9c3d 100644
--- a/checks/control-files.pm
+++ b/checks/control-files.pm
@@ -97,7 +97,7 @@ foreach my $file ($info->sorted_control_index) {
 
 # for other maintainer scripts checks, see the scripts check
 }
-
+return;
 } # </run>
 
 1;
diff --git a/checks/copyright-file.pm b/checks/copyright-file.pm
index 14e4687..e126df6 100644
--- a/checks/copyright-file.pm
+++ b/checks/copyright-file.pm
@@ -296,6 +296,7 @@ if ($gpl || m,/usr/share/common-licenses/GPL,) {
     }
 }
 
+return;
 } # </run>
 
 # -----------------------------------
@@ -328,6 +329,7 @@ sub check_cross_link {
         # tell if it is foreign or not at this point.
         tag 'cannot-check-whether-usr-share-doc-symlink-points-to-foreign-package';
     }
+    return;
 }
 
 1;
diff --git a/checks/cruft.pm b/checks/cruft.pm
index 46064e6..004a84b 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -190,6 +190,7 @@ for my $file (keys %ERRORS) {
     }
 }
 
+return;
 } # </run>
 
 # -----------------------------------
@@ -251,6 +252,7 @@ sub check_diffstat {
     # If there was nothing in the diffstat output, there was nothing in the
     # diff, which is probably a mistake.
     tag 'empty-debian-diff' unless $saw_file;
+    return;
 }
 
 # Check the debian directory for problems.  This is used for Format: 2.0 and
@@ -283,6 +285,7 @@ sub check_debfiles {
     if ($name =~ m@^(?:.+\.)?substvars$@o) {
         tag 'diff-contains-substvars', "debian/$name";
     }
+    return;
 }
 
 # Check each file in the source package for problems.  By the time we get to
@@ -586,6 +589,7 @@ sub find_cruft {
         }
         close($F);
     }
+    return;
 }
 
 1;
diff --git a/checks/deb-format.pm b/checks/deb-format.pm
index 47a41e3..276b22e 100644
--- a/checks/deb-format.pm
+++ b/checks/deb-format.pm
@@ -115,6 +115,7 @@ for my $file (keys %ERRORS) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/debconf.pm b/checks/debconf.pm
index 2a2c842..23feee1 100644
--- a/checks/debconf.pm
+++ b/checks/debconf.pm
@@ -105,7 +105,7 @@ if ($type eq 'source') {
     }
 
     # The remainder of the checks are for binary packages, so we exit now
-    return 0;
+    return;
 }
 
 my $preinst = $info->control('preinst');
@@ -508,7 +508,7 @@ if ($usespreinst) {
 # the following checks is ignored if the package being checked is debconf
 # itself.
 
-return 0 if ($pkg eq 'debconf') || ($type eq 'udeb');
+return if ($pkg eq 'debconf') || ($type eq 'udeb');
 
 foreach my $filename (sort keys %{$info->scripts}) {
     open(my $fd, '<', $info->unpacked($filename));
@@ -523,6 +523,7 @@ foreach my $filename (sort keys %{$info->scripts}) {
     close($fd);
 }
 
+return;
 } # </run>
 
 # -----------------------------------
diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 1ba9ac1..7232497 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -446,11 +446,13 @@ if ($seen_dh and $seen_python3_helper != 1) {
     }
 }
 
+return;
 }
 
 sub _tag_if_executable {
     my ($file, $path) = @_;
     tag 'package-file-is-executable', "debian/$file" if -f $path && -x _;
+    return;
 }
 
 # Perform various checks on a dh-exec file.
@@ -485,6 +487,7 @@ sub _check_dh_exec {
     if ( $dhe_install && $base ne 'install') {
         tag 'dh-exec-install-not-allowed-here', $pkgpath;
     }
+    return;
 }
 
 # Return the command after the #! in the file (if any).
diff --git a/checks/debian-readme.pm b/checks/debian-readme.pm
index 4e80a3f..2c3e6a2 100644
--- a/checks/debian-readme.pm
+++ b/checks/debian-readme.pm
@@ -55,6 +55,7 @@ if ($readme =~ m/$regex/io) {
 check_spelling('spelling-error-in-readme-debian', $readme, undef,
                $group->info->spelling_exceptions);
 
+return;
 }
 
 1;
diff --git a/checks/debian-source-dir.pm b/checks/debian-source-dir.pm
index 015f269..5db58e9 100644
--- a/checks/debian-source-dir.pm
+++ b/checks/debian-source-dir.pm
@@ -81,6 +81,7 @@ if ( ! -l $dsrc && -d $dsrc ) {
     closedir($dirfd);
 }
 
+return;
 }
 
 1;
diff --git a/checks/description.pm b/checks/description.pm
index 413d68b..8af3519 100644
--- a/checks/description.pm
+++ b/checks/description.pm
@@ -42,8 +42,8 @@ my $description;
 # description?
 my $full_description = $info->field('description');
 unless (defined $full_description) {
-    tag 'package-has-no-description', '';
-    return 0;
+    tag 'package-has-no-description';
+    return;
 }
 
 $full_description =~ m/^([^\n]*)\n(.*)$/s;
@@ -201,6 +201,7 @@ if ($description) {
     check_spelling_picky('capitalization-error-in-description', $description);
 }
 
+return;
 }
 
 1;
diff --git a/checks/duplicate-files.pm b/checks/duplicate-files.pm
index bf6346b..c141365 100644
--- a/checks/duplicate-files.pm
+++ b/checks/duplicate-files.pm
@@ -62,6 +62,7 @@ foreach my $hash (keys %hashmap){
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/fields.pm b/checks/fields.pm
index cd36f7d..4d7a1bb 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -1050,6 +1050,7 @@ for my $field (keys %{$info->field}) {
         if ($type eq 'udeb' && ! $KNOWN_UDEB_FIELDS->known ($field));
 }
 
+return;
 }
 
 # splits "foo:bar (>= 1.2.3) [!i386 ia64]" into
@@ -1109,6 +1110,7 @@ sub unfold {
         #  http://somewhere.com/$
         $$line=~s/^\s*+//;
     }
+    return;
 }
 
 1;
diff --git a/checks/filename-length.pm b/checks/filename-length.pm
index 5735827..40364b6 100644
--- a/checks/filename-length.pm
+++ b/checks/filename-length.pm
@@ -86,7 +86,7 @@ if ($len > FILENAME_LENGTH_LIMIT){
     tag 'source-package-component-has-long-file-name', "$len > " . FILENAME_LENGTH_LIMIT;
 }
 
-
+return;
 }
 
 1;
diff --git a/checks/files.pm b/checks/files.pm
index e9e4d98..7f5569b 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -1443,6 +1443,7 @@ if ($x11_font_dirs{misc} and keys (%x11_font_dirs) > 1) {
     tag 'package-mixes-misc-and-dpi-fonts';
 }
 
+return;
 }
 
 sub dir_counts {
diff --git a/checks/group-checks.pm b/checks/group-checks.pm
index 380a986..b348cc4 100644
--- a/checks/group-checks.pm
+++ b/checks/group-checks.pm
@@ -75,7 +75,7 @@ foreach my $comp (@$sccs) {
     tag 'intra-source-package-circular-dependency', sort @$comp;
 }
 
-
+return;
 }
 
 # Check that $proc has a priority that is less than or equal to that
@@ -97,6 +97,7 @@ sub _check_priorities {
                     unless $prival <= $dprival;
         }
     }
+    return;
 }
 
 sub _check_file_overlap {
@@ -127,6 +128,7 @@ sub _check_file_overlap {
             _overlap_check ($proc, $pinfo, $other, $oinfo);
         }
     }
+    return;
 }
 
 sub _overlap_check {
@@ -141,6 +143,7 @@ sub _overlap_check {
             tag 'binaries-have-file-conflict', $a_proc->pkg_name, $b_proc->pkg_name, $name;
         }
     }
+    return;
 }
 
 sub _check_multiarch {
@@ -169,6 +172,7 @@ sub _check_multiarch {
             }
         }
     }
+    return;
 }
 
 ## Encapsulate Tarjan's algorithm in an class/object to keep
@@ -241,6 +245,7 @@ sub _tarjans_sc{
         } until $node eq $elem;
         push @$scc, $component;
     }
+    return;
 }
 
 1;
diff --git a/checks/huge-usr-share.pm b/checks/huge-usr-share.pm
index 37ea2ae..e129e43 100644
--- a/checks/huge-usr-share.pm
+++ b/checks/huge-usr-share.pm
@@ -37,7 +37,7 @@ my (undef, undef, $info) = @_;
 
 # Skip architecture-dependent packages.
 my $arch = $info->field('architecture') || '';
-return 0 if $arch eq 'all';
+return if $arch eq 'all';
 
 # Add up the space taken by the package and the space taken by just the files
 # in /usr/share.  Convert the totals to kilobytes.
@@ -58,6 +58,7 @@ if ($size_usrshare > $THRESHOLD_SIZE_SOFT) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/infofiles.pm b/checks/infofiles.pm
index 16f24fd..5995ab7 100644
--- a/checks/infofiles.pm
+++ b/checks/infofiles.pm
@@ -94,6 +94,7 @@ foreach my $file ($info->sorted_index) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/init.d.pm b/checks/init.d.pm
index 199ad63..1504485 100644
--- a/checks/init.d.pm
+++ b/checks/init.d.pm
@@ -54,6 +54,7 @@ my %implied_dependencies =
     (
      'mountall'   => '$local_fs',
      'mountnfs'   => '$remote_fs',
+
      'hwclock'    => '$time',
      'portmap'    => '$portmap',
      'named'      => '$named',
@@ -217,6 +218,7 @@ for my $script (readdir($dirfd)) {
 }
 closedir($dirfd);
 
+return;
 }
 
 sub check_init {
@@ -458,6 +460,8 @@ sub check_init {
         $tag{$option}
             or tag 'init.d-script-does-not-implement-optional-option', "etc/init.d/${initd_file} $option";
     }
+
+    return;
 }
 
 1;
diff --git a/checks/java.pm b/checks/java.pm
index 5a22eef..aa0d5a7 100644
--- a/checks/java.pm
+++ b/checks/java.pm
@@ -221,6 +221,7 @@ if(! $has_public_jars && $pkg =~ /^lib[^\s,]+-java$/) {
     tag 'javalib-but-no-public-jars';
 }
 
+return;
 }
 1;
 
diff --git a/checks/manpages.pm b/checks/manpages.pm
index 0dc841a..be67f6f 100644
--- a/checks/manpages.pm
+++ b/checks/manpages.pm
@@ -375,6 +375,7 @@ for my $f (sort keys %binary) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/md5sums.pm b/checks/md5sums.pm
index 8711910..962084d 100644
--- a/checks/md5sums.pm
+++ b/checks/md5sums.pm
@@ -41,7 +41,7 @@ return if -l $control;
 # Is there a md5sums control file?
 unless (-f $control) {
     # ignore if package contains no files
-    return 0 if -z $info->lab_data_path ('md5sums');
+    return if -z $info->lab_data_path ('md5sums');
 
     # check if package contains non-conffiles
     # debhelper doesn't create entries in md5sums
@@ -58,12 +58,12 @@ unless (-f $control) {
     }
 
     tag 'no-md5sums-control-file' unless $only_conffiles;
-    return 0;
+    return;
 }
 
 # Is it empty? Then skip it. Tag will be issued by control-files
 if (-z $control) {
-    return 0;
+    return;
 }
 
 # read in md5sums control file
@@ -96,6 +96,7 @@ for my $file (keys %{ $info->md5sums }) {
         unless ($info->is_conffile ($file) || $file =~ m%^var/lib/[ai]spell/.%o);
 }
 
+return;
 }
 
 1;
diff --git a/checks/menu-format.pm b/checks/menu-format.pm
index 5757eb8..1318609 100644
--- a/checks/menu-format.pm
+++ b/checks/menu-format.pm
@@ -300,6 +300,7 @@ foreach my $menufile (@menufiles) {
     close($fd);
 }
 
+return;
 }
 
 # -----------------------------------
@@ -514,6 +515,7 @@ sub verify_line {
             tag 'menu-item-creates-new-section', "$vals{section} $fullname:$linecount";
         }
     }
+    return;
 }
 
 
@@ -717,6 +719,7 @@ sub verify_desktop_file {
             tag 'desktop-entry-limited-to-environments', $file;
         }
     }
+    return;
 }
 
 # Verify whether a command is shipped as part of the package.  Takes the full
diff --git a/checks/menus.pm b/checks/menus.pm
index 55d47e7..48f934d 100644
--- a/checks/menus.pm
+++ b/checks/menus.pm
@@ -223,6 +223,7 @@ if ($anymenu_file) {
     }
 }
 
+return;
 }
 
 # -----------------------------------
@@ -307,6 +308,8 @@ sub check_doc_base_file {
     tag 'doc-base-file-no-format-section', "$dbfile:$." unless %sawformats;
 
     close($fd);
+
+    return;
 }
 
 # Checks one field of a doc-base control file.  $vals is array ref containing
@@ -463,6 +466,8 @@ sub check_doc_base_field {
                                  join (' ', @$vals), "$dbfile:$line");
         }
     }
+
+    return;
 }
 
 # Checks the section of the doc-base control file.  Tries to find required
@@ -485,6 +490,8 @@ sub check_doc_base_file_section {
         tag 'doc-base-file-lacks-required-field', "$dbfile:$line", $field
             if ($knownfields->{$field} == 1 && !$sawfields->{$field});
     }
+
+    return;
 }
 
 # Add file and link to $all_files and $all_links.  Note that both files and
@@ -517,6 +524,8 @@ sub add_file_link_info {
         }
         $all_links->{$file} = $link unless ($link eq $file);
     }
+
+    return;
 }
 
 
@@ -644,6 +653,7 @@ sub check_script {
         }
     }
     close($fd);
+    return;
 }
 
 1;
diff --git a/checks/nmu.pm b/checks/nmu.pm
index c71984a..e5593ce 100644
--- a/checks/nmu.pm
+++ b/checks/nmu.pm
@@ -42,7 +42,7 @@ my $changelog_mentions_team_upload = 0;
 # symlink.
 if (-l $info->debfiles('changelog')) {
     tag 'changelog-is-symlink';
-    return 0;
+    return;
 }
 
 # Get some data from the changelog file.
@@ -120,6 +120,7 @@ if ($maintainer =~ /packages\@qa.debian.org/) {
         if !$upload_is_nmu && $version_nmuness;
 }
 
+return;
 }
 
 # Canonicalize a maintainer address with respect to case.  E-mail addresses
diff --git a/checks/ocaml.pm b/checks/ocaml.pm
index e23373a..eab4b06 100644
--- a/checks/ocaml.pm
+++ b/checks/ocaml.pm
@@ -179,6 +179,7 @@ if ($is_dev_package) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/patch-systems.pm b/checks/patch-systems.pm
index dca2e6d..cca55a2 100644
--- a/checks/patch-systems.pm
+++ b/checks/patch-systems.pm
@@ -244,6 +244,7 @@ sub run {
         tag 'direct-changes-in-diff-but-no-patch-system', $files
             if (not $uses_patch_system);
     }
+    return;
 }
 
 # Checks on patches common to all build systems.
@@ -264,6 +265,7 @@ sub check_patch {
         }
     }
     close($fd);
+    return;
 }
 
 1;
diff --git a/checks/po-debconf.pm b/checks/po-debconf.pm
index a2587f3..ac6c1b8 100644
--- a/checks/po-debconf.pm
+++ b/checks/po-debconf.pm
@@ -86,10 +86,10 @@ if ( $has_template ) {
     }
     if ( ! -d "$debfiles/po" ) {
         tag 'not-using-po-debconf';
-        return 0;
+        return;
     }
 } else {
-    return 0;
+    return;
 }
 
 # If we got here, we're using po-debconf, so there shouldn't be any stray
@@ -171,6 +171,7 @@ closedir($po_dirfd);
 
 tag 'no-complete-debconf-translation' if !$full_translation;
 
+return;
 }
 
 1;
diff --git a/checks/rules.pm b/checks/rules.pm
index b50ab1f..020b87e 100644
--- a/checks/rules.pm
+++ b/checks/rules.pm
@@ -116,7 +116,7 @@ my $rules = $info->debfiles('rules');
 # all the tests if we then can't read it.
 if (-l $rules) {
     tag 'debian-rules-is-symlink';
-    return 0 unless -f $rules and is_ancestor_of($info->debfiles, $rules);
+    return unless -f $rules and is_ancestor_of($info->debfiles, $rules);
 }
 
 my $architecture = $info->field('architecture') || '';
@@ -427,6 +427,7 @@ for my $package (keys %needed) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 08ab785..b7c069b 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -190,6 +190,7 @@ sub script_tag {
         if $filename and $filename =~ m,usr/share/doc/[^/]+/examples/,;
 
     tag( $tag, $filename, @rest );
+    return;
 }
 
 sub run {
@@ -1003,6 +1004,7 @@ for my $divert (keys %added_diversions) {
     }
 }
 
+return;
 }
 
 # -----------------------------------
diff --git a/checks/shared-libs.pm b/checks/shared-libs.pm
index 0fed09e..a814d8a 100644
--- a/checks/shared-libs.pm
+++ b/checks/shared-libs.pm
@@ -661,6 +661,7 @@ if (-f $info->control('postrm') and not -l $info->control('postrm')) {
     }
 }
 
+return;
 }
 
 # make /tmp/baz/baz.txt from /tmp/foo/../bar/../baz/baz.txt
diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index 275c228..5be124d 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -227,6 +227,7 @@ if (@dep5) {
     }
 }
 
+return;
 }
 
 sub split_licenses {
diff --git a/checks/standards-version.pm b/checks/standards-version.pm
index d71fb59..3429a14 100644
--- a/checks/standards-version.pm
+++ b/checks/standards-version.pm
@@ -65,7 +65,7 @@ $all_udeb = 0
 
 if (not defined $version) {
     tag 'no-standards-version-field' unless $all_udeb;
-    return 0;
+    return;
 }
 
 # Check basic syntax and strip off the fourth digit.  People are allowed to
@@ -74,7 +74,7 @@ if (not defined $version) {
 # field.
 unless ($version =~ m/^\s*(\d+\.\d+\.\d+)(?:\.\d+)?\s*$/) {
     tag 'invalid-standards-version', $version;
-    return 0;
+    return;
 }
 my $stdver = $1;
 my ($major, $minor, $patch) = $stdver =~ m/^(\d+)\.(\d+)\.(\d+)/;
@@ -115,7 +115,7 @@ if (not $STANDARDS->known($stdver)) {
     }
 } elsif ($stdver eq $CURRENT) {
     # Current standard.  Nothing more to check.
-    return 0;
+    return;
 } else {
     # Otherwise, we need to see if the standard that this package declares is
     # both new enough to not be ancient and was the current standard at the
@@ -132,7 +132,7 @@ if (not $STANDARDS->known($stdver)) {
         # can't find the changelog file, always issue the tag.
         if (not defined $changes) {
             tag 'out-of-date-standards-version', $tag;
-            return 0;
+            return;
         }
         my ($entry) = $changes->data;
         my $timestamp = ($entry && $entry->Timestamp) ? $entry->Timestamp : 0;
@@ -146,6 +146,7 @@ if (not $STANDARDS->known($stdver)) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/symlinks.pm b/checks/symlinks.pm
index 6b2b095..8ee44b6 100644
--- a/checks/symlinks.pm
+++ b/checks/symlinks.pm
@@ -109,6 +109,7 @@ foreach my $blink (@brokenlinks){
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/testsuite.pm b/checks/testsuite.pm
index b28b04f..77a8c4c 100644
--- a/checks/testsuite.pm
+++ b/checks/testsuite.pm
@@ -79,6 +79,7 @@ sub run {
             check_control_contents($info, $path);
         }
     }
+    return;
 }
 
 sub check_control_contents {
@@ -94,6 +95,7 @@ sub check_control_contents {
             check_control_paragraph($info, $paragraph);
         }
     }
+    return;
 }
 sub check_control_paragraph {
     my ($info, $paragraph) = @_;
@@ -135,7 +137,9 @@ sub check_control_paragraph {
             check_test_file ($info, $directory, $testname);
         }
     }
+    return;
 }
+
 sub check_test_file {
     my ($info, $directory, $name) = @_;
     my $path = "$directory/$name";
@@ -150,6 +154,7 @@ sub check_test_file {
         tag 'runtime-test-file-is-not-a-regular-file', $path;
     }
     # Test files are allowed not to be executable.
+    return;
 }
 
 1;
diff --git a/checks/version-substvars.pm b/checks/version-substvars.pm
index 2cdb592..5780adb 100644
--- a/checks/version-substvars.pm
+++ b/checks/version-substvars.pm
@@ -112,6 +112,7 @@ foreach my $pkg1 (sort $info->binaries) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/checks/watch-file.pm b/checks/watch-file.pm
index 2d14318..8cc0799 100644
--- a/checks/watch-file.pm
+++ b/checks/watch-file.pm
@@ -190,6 +190,7 @@ if (defined $changes and %dversions) {
     }
 }
 
+return;
 }
 
 1;
diff --git a/debian/changelog b/debian/changelog
index 480f06c..f608d74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
 lintian (2.5.15) UNRELEASED; urgency=low
 
+  * checks/*.pm:
+    + [NT] Add final return to all subs in checks and ensure
+      that the "run" sub complies with Lintian's own
+      recommendation.
+
   * collection/copyright-file:
     + [NT] Avoid creating an empty copyright file when it is
       not needed.

-- 
Debian package checker


Reply to: