sanity-check.pl: detect .delaygc non-empty projects
authorKyle J. McKay <[email protected]>
Wed, 18 Aug 2021 17:43:42 +0000 (18 10:43 -0700)
committerKyle J. McKay <[email protected]>
Wed, 18 Aug 2021 17:43:42 +0000 (18 10:43 -0700)
Other than a .clone_in_progress project, if a .delaygc project is
not empty and does not have a .allowgc file, then warn about it.

Signed-off-by: Kyle J. McKay <[email protected]>
toolbox/sanity-check.pl

index b1a269d..dbf5563 100755 (executable)
@@ -11,7 +11,7 @@
 use strict;
 use warnings;
 use vars qw($VERSION);
-BEGIN {*VERSION = \'1.0.0'}
+BEGIN {*VERSION = \'1.0.1'}
 use Scalar::Util qw(looks_like_number);
 use File::Basename qw(basename);
 use lib "__BASEDIR__";
@@ -172,6 +172,9 @@ sub check_projects {
                        if (!ref($p)) {
                                push(@p, "unloadable");
                        } else {
+                               if (-e "$pd/.delaygc" && ! -e "$pd/.allowgc" && ! -e "$pd/.clone_in_progress") {
+                                       !$p->is_empty and push(@p, "delaygc-not-empty");
+                               }
                                my ($cnt, $err) = (0, "");
                                my $origreadme = $p->{README};
                                defined($origreadme) or $origreadme = "";