MT#2655 setup Test::Perl::Critic::Progressive

ipeshinskaya/InvoiceTemplate6
Gerhard Jungwirth 12 years ago
parent cf93f0bf63
commit cf404f1b9a

1
.gitignore vendored

@ -38,3 +38,4 @@ META.*
MYMETA.*
SIGNATURE
NGCP-Panel-*
.perlcritic-history

@ -0,0 +1,66 @@
verbose = %f line %l col %c\n [%s] %p (%e) = %m\n %r\n
# the ouput format, another nice one is 8, the [%s] is the severity
severity = 2
theme = security || (pbp && bugs) || cosmetic || sipwise
# This is optional, define your own colors if you like:
#colour-severity-5 = magenta
#colour-severity-4 = red
#colour-severity-3 = yellow
#colour-severity-2 = blue
#colour-severity-1 = black
[Documentation::RequirePodSections]
#lib_sections = NAME | VERSION | SYNOPSIS | DESCRIPTION | INTERFACE | Composition | Attributes | Methods | Exports | DIAGNOSTICS | CONFIGURATION AND ENVIRONMENT | DEPENDENCIES | INCOMPATIBILITIES | BUGS AND LIMITATIONS | TO DO | AUTHOR | SEE ALSO
add_themes = sipwise
lib_sections = NAME | DESCRIPTION | LICENSE | AUTHOR
# lets keep this simple for now
[Bangs::ProhibitCommentedOutCode]
commentedcoderegex = \$(?!Id)[A-Za-z_].*=/
add_themes = sipwise
# should not trigger on the RCS variable
[Perl::Critic::Policy::Tics::ProhibitLongLines]
add_themes = sipwise
base_max = 100
hard_max = 160
pct_allowed = 50
# terminal width
[InputOutput::RequireCheckedSyscalls]
add_themes = sipwise
functions = :builtins
exclude_functions = print
[-Modules::RequireExplicitInclusion]
# we dont want this
[BuiltinFunctions::ProhibitStringyEval]
allow_includes = 0
# use Module::Runtime for includes
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = strictures Sipwise::Base HTML::FormHandler::Moose
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = strictures Sipwise::Base HTML::FormHandler::Moose
[Modules::RequireEndWithOne]
severity = 1
# not really important, since this is redundant with perl5i (Sipwise::Base)
##### Other exclusions
# [-Subroutines::RequireFinalReturn]
# this is actually a good thing
[-CodeLayout::ProhibitHashBarewords]
# meh, it's super annoying
[-Lax::ProhibitStringyEval::ExceptForRequire]
# already covered through BuiltinFunctions::ProhibitStringyEval::allow_includes
[-ControlStructures::ProhibitPostfixControls]
[-ControlStructures::ProhibitUnlessBlocks]
[-RegularExpressions::RequireLineBoundaryMatching]
[-RegularExpressions::RequireDotMatchAnything]
[-ValuesAndExpressions::ProhibitEmptyQuotes]
[-ValuesAndExpressions::ProhibitNoisyQuotes]

@ -121,9 +121,8 @@ my $builder = Local::Module::Build->new(
# for the testcover target
'Devel::Cover' => 0,
'sigtrap' => 0,
# for development
'Convert::Ascii85' => 0,
'IO::Uncompress::UnXz' => 0,
# for perlcritic test
'Test::Perl::Critic::Progressive' => 0,
},
add_to_cleanup => [ 'NGCP-Panel-*' ],
);

@ -0,0 +1,10 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
eval { require Test::Perl::Critic::Progressive };
plan skip_all => 'T::P::C::Progressive required for this test' if $@;
Test::Perl::Critic::Progressive::set_history_file('.perlcritic-history');
Test::Perl::Critic::Progressive::progressive_critic_ok('lib');
Loading…
Cancel
Save