blob: c21b487484028b92336cdfa808ad3e8cb608c138 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Perl::Critic configuration. -*- conf-mode -*-
# we turn on all of the policies at theme level, and then
# we turn off one-by-one the ones I don't like below.
severity = 1
theme =
# compilation-mode--compatible diagnostic formatting
verbose = %f:%l:%c: warning: %m (%p; %e)\n
### Tuning
[CodeLayout::RequireTidyCode]
perltidyrc = .perltidyrc
[InputOutput::RequireCheckedSyscalls]
# check everything except print
functions = :builtins
exclude_functions = print
[Subroutines::RequireFinalReturn]
terminal_funcs = fail skip error invocation_error subprocess_error
[TestingAndDebugging::ProhibitNoWarnings]
allow = experimental::smartmatch experimental::re_strict
### Disabled policies
# Version strings were only problematic in versions of Perl older than
# our minimum.
[-ValuesAndExpressions::ProhibitVersionStrings]
# The rationale for prohibiting boolean 'grep' is sensible
# (it doesn't short-circuit, which could be a huge waste of time)
# but the recommended alternative is 'any' from List::MoreUtils,
# which would be the only CPAN dependency we had.
[-BuiltinFunctions::ProhibitBooleanGrep]
# The "complex" subroutines and regexes are not that bad and splitting
# them up would only obscure the logic.
[-Subroutines::ProhibitExcessComplexity]
[-RegularExpressions::ProhibitComplexRegexes]
# I can't find any explanation of what qualifies as "brief" and the
# diagnostic triggers on perfectly sensible code.
[-InputOutput::RequireBriefOpen]
# I'd *like* to disable this *only* for $_, where the whole point is
# that it gets written to (and read from) implicitly, but that's not
# possible.
[-Variables::RequireInitializationForLocalVars]
# These rules only make sense for large libraries with lots
# of consumers.
[-ErrorHandling::RequireCarping]
[-Modules::RequireVersionVar]
# We intentionally 'use utf8' in every file, regardless of whether it
# currently has non-ASCII characters in it.
[-TooMuchCode::ProhibitUnnecessaryUTF8Pragma]
# Doesn't understand the unusual, but unavoidable, uses of -f in this code
# (to identify executables without actually running them).
[-ValuesAndExpressions::ProhibitFiletest_f]
# FindBin works fine for our purposes, and we can't use CPAN modules.
# There is no option to ignore use of just one module.
[-Freenode::DiscouragedModules]
# Style rules I don't agree with.
[-ControlStructures::ProhibitPostfixControls]
[-Freenode::Each]
[-Freenode::Wantarray]
[-Freenode::WhileDiamondDefaultAssignment]
[-NamingConventions::Capitalization]
[-RegularExpressions::ProhibitEnumeratedClasses]
[-RegularExpressions::ProhibitEscapedMetacharacters]
[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireExtendedFormatting]
[-RegularExpressions::RequireLineBoundaryMatching]
[-TooMuchCode::ProhibitDuplicateLiteral]
[-ValuesAndExpressions::ProhibitMagicNumbers]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-Variables::ProhibitPunctuationVars]
# Freenode:: modules that duplicate core and pulp perlcritic modules.
[-Freenode::AmpersandSubCalls]
[-Freenode::ArrayAssignAref]
[-Freenode::BarewordFilehandles]
[-Freenode::ConditionalDeclarations]
[-Freenode::IndirectObjectNotation]
[-Freenode::LexicalForeachIterator]
[-Freenode::LoopOnHash]
[-Freenode::OpenArgs]
[-Freenode::PackageMatchesFilename]
[-Freenode::POSIXImports]
[-Freenode::Prototypes]
[-Freenode::StrictWarnings]
|