1 ## Perl Critic configuration file
3 verbose = %f %l:%c (Severity: %s)\n %P (%s)\n near '%r'\n%d\n
4 program-extensions = .pl .t
10 [ControlStructures::ProhibitMutatingListFunctions]
11 add_list_funcs = Dpkg::Util::any Dpkg::Util::none
13 [RegularExpressions::ProhibitUnusualDelimiters]
14 allow_all_brackets = 1
16 [RegularExpressions::RequireBracesForMultiline]
17 allow_all_brackets = 1
19 [RegularExpressions::RequireExtendedFormatting]
20 minimum_regex_length_to_complain_about = 60
22 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
23 # TODO: switch these to q{} ?
24 allow_if_string_contains_single_quote = 1
30 # Complex is not always bad.
31 [-BuiltinFunctions::ProhibitComplexMappings]
33 # Needed when generating code.
34 [-BuiltinFunctions::ProhibitStringyEval]
37 [-Documentation::PodSpelling]
39 # While this might be good for performance, it is bad for keeping docs updated.
40 [-Documentation::RequirePodAtEnd]
43 [-Documentation::RequirePodLinksIncludeText]
45 # TODO: Standardize sections, but the ones from this are not usable.
46 [-Documentation::RequirePodSections]
48 # Too many false positives.
49 [-CodeLayout::RequireTidyCode]
51 # Forcing this just turns into noise (depending on the context, it makes sense).
52 [-CodeLayout::RequireTrailingCommas]
55 [-ControlStructures::ProhibitCascadingIfElse]
57 # These are fine, too many in the code base anyway.
58 [-ControlStructures::ProhibitPostfixControls]
60 # These are fine, usually as long as they are not double negations.
61 [-ControlStructures::ProhibitUnlessBlocks]
63 # FIXME: Too many false positives.
64 [-ControlStructures::ProhibitUnreachableCode]
66 # TODO: Check it out, add new Dpkg::Program module?
67 [-InputOutput::ProhibitBacktickOperators]
69 # Needed, using <>/<@ARGV> is not correct, Prompt is not a core module.
70 [-InputOutput::ProhibitExplicitStdin]
72 # TODO: Maybe, some of these are part of the public/current API.
73 [-Modules::ProhibitAutomaticExportation]
75 # Complex is not always bad.
76 [-Modules::ProhibitExcessMainComplexity]
78 # FIXME: Too many false positives; non-modules all trigger.
79 [-Modules::RequireVersionVar]
82 [-NamingConventions::ProhibitAmbiguousNames]
84 # We work primarily with ASCII, so we need to specify the exact characters
86 [-RegularExpressions::ProhibitEnumeratedClasses]
88 # When . is used in the code it means what it does.
89 [-RegularExpressions::RequireDotMatchAnything]
91 # When ^ or $ are used in the code they mean what they do.
92 [-RegularExpressions::RequireLineBoundaryMatching]
94 # TODO: While valid, these are part of the public/current API.
95 [-Subroutines::ProhibitBuiltinHomonyms]
98 [-Subroutines::ProhibitSubroutinePrototypes]
100 # Adding these seems like more noise.
101 [-Subroutines::RequireFinalReturn]
103 # Readers need to know perl, English module is worse.
104 [-Variables::ProhibitPunctuationVars]
106 # Readers need to know perl.
107 [-Variables::RequireInitializationForLocalVars]
109 # FIXME: Too many false positives; on ::main and for $ENV, $SIG, $?, $a, $b.
110 [-Variables::RequireLocalizedPunctuationVars]
112 # Readonly is not a core module.
113 [-ValuesAndExpressions::ProhibitConstantPragma]
115 # TODO: Check it out, using other quotes might be less readable and uniform.
116 [-ValuesAndExpressions::ProhibitEmptyQuotes]
118 # Used for help output.
119 [-ValuesAndExpressions::ProhibitImplicitNewlines]
122 [-ValuesAndExpressions::ProhibitLeadingZeros]
124 # TODO: Check it out, some magic numbers are fine, octals for example.
125 [-ValuesAndExpressions::ProhibitMagicNumbers]
127 # FIXME: False positives on long hex numbers, even when separated.
128 [-ValuesAndExpressions::RequireNumberSeparators]