blob: 0483dbb061a3eb0428e6dd75aa58a0cd743d0254 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/env perl -w
use strict;
my $filename = $ARGV[0];
if (!$filename) {
print "Usage: docblocks.pl <filename>\n";
exit(1);
}
my %allowed = ("" => 1,
"<?php" => 1);
open(HANDLE, "<", $filename) or die "Cannot open $filename\n";
while (<HANDLE>) {
chomp;
if ($_ =~ /\/\*\*/) {
exit(0);
} elsif (!$allowed{$_}) {
print $filename."\n";
exit(1);
}
}
|