You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
411 B
24 lines
411 B
#!/usr/bin/env perl
|
|
|
|
use Modern::Perl;
|
|
use Perl::Critic qw/critique/;
|
|
my @files = @ARGV;
|
|
my $params = {
|
|
-theme => 'security',
|
|
};
|
|
|
|
usage() unless @files;
|
|
|
|
for my $file (@files) {
|
|
next unless -f $file;
|
|
my @critique = critique($params, $file);
|
|
if (@critique) {
|
|
say "$file: ";
|
|
print "\t", join "\t",@critique;
|
|
print "\n";
|
|
}
|
|
}
|
|
|
|
sub usage {
|
|
say "$0 file1 file2 ...";
|
|
}
|
|
|