Old script deleted.
This commit is contained in:
1 parent
2e7ffc6a6f
commit
3f53dde4ae
1 file changed
-33
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
# Copyright 2010-2011 Ethrik development team #
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Perl::Critic;
|
|
||||||
my $level;
|
|
||||||
|
|
||||||
print "Usage: $0 <file> [level]\n" and exit 0 if !defined $ARGV[0];
|
|
||||||
|
|
||||||
if (!-e $ARGV[0])
|
|
||||||
{
|
|
||||||
print "$0: could not find $ARGV[0]\n";
|
|
||||||
print "usage: $0 <file> [level]\n";
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ARGV[1] and $ARGV[1] =~ m/(5|4|3|2|1|gentle|stern|harsh|cruel|brutal)/xsm) {
|
|
||||||
$level = $ARGV[1];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$level = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
my $critic = Perl::Critic->new(-severity => $level);
|
|
||||||
my @violations = $critic->critique($ARGV[0]);
|
|
||||||
|
|
||||||
print "$ARGV[0] passed (no violations)\n" and exit 0 if !defined $violations[0];
|
|
||||||
|
|
||||||
print "Violations:\n";
|
|
||||||
my $count = 0;
|
|
||||||
print "$_\n" and $count++ foreach (@violations);
|
|
||||||
print "Total Violations: $count\n";
|
|
||||||
Reference in new issue
Block a user