InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:
#internal method to get file content of this commit my $content = read_file_content($file_name); my @violations = critique({-profile => 'perlcritic.conf'} , \$content); # report violations foreach my $crit (@violations){ print STDERR "[$file_name] " . $crit->to_string . "\tsource: " . $crit->source . "\n"; }
[CodeLayout::RequireTidyCode] perltidyrc = /svn/hooks/perltidy.conf
-bl # braces on new lines -l=80 #80 col width -i=4 #4 char per indent -ce # cuddled else
among other violations, such as unindented code and code crossing 80 columns etc..... if(1) { print "1"; } else { print "2"; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl::Critic and Perl::Tidy
by chotchki (Novice) on May 25, 2007 at 19:51 UTC | |
by InfiniteLoop (Hermit) on May 25, 2007 at 20:00 UTC | |
by InfiniteLoop (Hermit) on May 25, 2007 at 19:55 UTC |