From f1281597af1c640d1dd7c1c11e4c900323c68fa6 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 18 Aug 2021 10:43:42 -0700 Subject: [PATCH] sanity-check.pl: detect .delaygc non-empty projects 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 --- toolbox/sanity-check.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolbox/sanity-check.pl b/toolbox/sanity-check.pl index b1a269d..dbf5563 100755 --- a/toolbox/sanity-check.pl +++ b/toolbox/sanity-check.pl @@ -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 = ""; -- 2.11.4.GIT