View | Details | Raw Unified | Return to bug 104042
Collapse All | Expand All

(-)portlint.pl (+16 lines)
Lines 24-29 Link Here
24
use Getopt::Std;
24
use Getopt::Std;
25
use File::Find;
25
use File::Find;
26
use IPC::Open2;
26
use IPC::Open2;
27
use POSIX qw(strftime);
27
use strict;
28
use strict;
28
29
29
sub perror($$$$);
30
sub perror($$$$);
Lines 1338-1343 Link Here
1338
	}
1339
	}
1339
1340
1340
	#
1341
	#
1342
	# whole file: EXPIRATION_DATE
1343
	#
1344
	print "OK: checking for EXPIRATION_DATE.\n" if ($verbose);
1345
	my $date;
1346
	if (($date) = ($whole =~ m/\nEXPIRATION_DATE\??=[ \t]*([^\n]*)\n/)) {
1347
		my $lineno = &linenumber($`);
1348
		if ($date ne strftime("%Y-%m-%d", 0, 0, 0,
1349
				substr($date, 8, 2),
1350
				substr($date, 5, 2) - 1,
1351
				substr($date, 0, 4) - 1900)) {
1352
			&perror("FATAL", $file, $lineno, "EXPIRATION_DATE ($date) is not in YYYY-MM-DD format.");
1353
		}
1354
	}
1355
1356
	#
1341
	# whole file: IS_INTERACTIVE/NOPORTDOCS
1357
	# whole file: IS_INTERACTIVE/NOPORTDOCS
1342
	#
1358
	#
1343
	print "OK: checking IS_INTERACTIVE.\n" if ($verbose);
1359
	print "OK: checking IS_INTERACTIVE.\n" if ($verbose);

Return to bug 104042