Debian Codegraph @

xt/perlcritic.rc

raw
1 # nice output, to easily see the POD of the policy
2 verbose = [%p] %m at %f line %l, near '%r'\n
3 # severity of 3 is a good start (1 is very strict, 5 very tolerant)
4 severity = 3
5 # we want to use // without //ms
6 [-RegularExpressions::RequireDotMatchAnything]
7 [-RegularExpressions::RequireLineBoundaryMatching]
8 [-RegularExpressions::RequireExtendedFormatting]
9 minimum_regex_length_to_complain_about = 5
10 [-RegularExpressions::ProhibitComplexRegexes]
11 # we don't want these POD rules
12 [-Documentation::RequirePodSections]
13 # We don't care about POD links
14 [-Documentation::RequirePodLinksIncludeText]
15 # we use $@ and $!
16 [-Variables::ProhibitPunctuationVars]
17 # We want to be able to use Carp::Verbose in our tests scripts, so
18 # we add Carp to the whitelist
19 [Variables::ProhibitPackageVars]
20 packages = Data::Dumper File::Find FindBin Log::Log4perl Carp
21 [-ValuesAndExpressions::ProhibitEmptyQuotes]
22 # I really don't think q{/} is more readable than '/'...
23 [-ValuesAndExpressions::ProhibitNoisyQuotes]
24 # Perl::Critic recommends Readonly, but this IS BAD!
25 # we use Const::Fast instead, but this policy keeps popping up.
26 [-ValuesAndExpressions::ProhibitMagicNumbers]
27 # we want to be able to build DSLs
28 [-Modules::ProhibitAutomaticExportation]
29 # We only want the main module to provide $VERSION
30 [-Modules::RequireVersionVar]
31 # we want to be able to define short getters
32 [-Subroutines::RequireFinalReturn]
33 # we can't do @_ mesures with that one
34 [-Subroutines::RequireArgUnpacking]
35 # name is a common used name for methods
36 # but forbidden by this policy ...
37 [-Subroutines::ProhibitBuiltinHomonyms]
38 # some old libs use many args, we don't want to block that for now
39 [-Subroutines::ProhibitManyArgs]
40 # we allo protected subs
41 [-Subroutines::ProhibitUnusedPrivateSubroutines]
42 # We're not under CVS! :)
43 [-Miscellanea::RequireRcsKeywords]
44 [TestingAndDebugging::ProhibitNoStrict]
45 allow = refs
46 [TestingAndDebugging::ProhibitNoWarnings]
47 allow = redefine prototype
48 [TestingAndDebugging::RequireUseStrict]
49 equivalent_modules = strictures Moo Moo::Role
50 [TestingAndDebugging::RequireUseWarnings]
51 equivalent_modules = strictures Moo Moo::Role
52 # we use postifx controls
53 [-ControlStructures::ProhibitPostfixControls]
54 [-ControlStructures::ProhibitCascadingIfElse]
55 # We want to use croak everywhere instead of die
56 [ErrorHandling::RequireCarping]
57 # allow backtick if capture result
58 [InputOutput::ProhibitBacktickOperators]
59 only_in_void_context = 1
60 [-Variables::ProhibitAugmentedAssignmentInDeclaration]