forked from beyondgrep/ack3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
perlcriticrc
107 lines (88 loc) · 3.72 KB
/
perlcriticrc
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
100
101
102
103
104
105
106
107
verbose = %f:%l:%c %m (%p)\n %r\n\n
[-Bangs::ProhibitFlagComments]
[-Bangs::ProhibitNumberedNames]
[-BuiltinFunctions::ProhibitBooleanGrep]
# Boolean grep is OK since we can't use List::Util
[-BuiltinFunctions::ProhibitStringyEval]
# That's how we have to load our modules.
[-CodeLayout::ProhibitParensWithBuiltins]
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0
[-CodeLayout::RequireTidyCode]
# Never works for me.
[-CodeLayout::RequireTrailingCommaAtNewline]
# I like this one but it gives too many false positives.
[Compatibility::PodMinimumVersion]
above_version = 5.010001
[-ControlStructures::ProhibitCascadingIfElse]
[-ControlStructures::ProhibitCStyleForLoops]
[-ControlStructures::ProhibitDeepNests]
[-ControlStructures::ProhibitPostfixControls]
[-ControlStructures::ProhibitUnlessBlocks]
[-Documentation::PodSpelling]
[-Documentation::RequireEndBeforeLastPod]
# We could have __END__ at the end of ack if not for the squashing.
[-Documentation::RequireLinkedURLs]
[-Documentation::RequirePodAtEnd]
[-Documentation::RequirePodLinksIncludeText]
# I'm not worried about link text.
[-Documentation::RequirePodSections]
[-Editor::RequireEmacsFileVariables]
# We're a utility. We're OK with die.
[-ErrorHandling::RequireCarping]
[-ErrorHandling::RequireUseOfExceptions]
[-InputOutput::ProhibitInteractiveTest]
[-InputOutput::ProhibitBacktickOperators]
[-InputOutput::RequireBriefOpen]
# We open files in functions and pass them around.
[-InputOutput::RequireCheckedClose]
[InputOutput::RequireCheckedSyscalls]
functions = open opendir read readline readdir
[-Modules::RequireExplicitInclusion]
# We'd really like to use this, but it's too noisy as is.
# If https://github.com/Perl-Critic/Perl-Critic-StricterSubs/issues/9 ever gets implemented, add this back in.
[-Modules::ProhibitAutomaticExportation]
[-Modules::ProhibitExcessMainComplexity]
[-Modules::ProhibitMultiplePackages]
[-Modules::RequirePerlVersion]
[-Modules::RequireVersionVar]
[-NamingConventions::Capitalization]
# Some of our variables are mixed case, like $opt_L.
[-NamingConventions::ProhibitAmbiguousNames]
[-RegularExpressions::ProhibitComplexRegexes]
[-RegularExpressions::ProhibitEnumeratedClasses]
[-RegularExpressions::ProhibitEscapedMetacharacters]
[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireExtendedFormatting]
[-RegularExpressions::RequireLineBoundaryMatching]
[-Subroutines::ProhibitBuiltinHomonyms]
# We have plenty of funcs that we know are homonyms in ack, like open and close, but that's OK
[-Subroutines::ProhibitCallsToUndeclaredSubs]
[-Subroutines::ProhibitCallsToUnexportedSubs]
[-Subroutines::ProhibitExcessComplexity]
# Some of our subroutines are necessarily complex.
[-Subroutines::ProhibitExplicitReturnUndef]
[-Subroutines::RequireArgUnpacking]
[Subroutines::RequireFinalReturn]
terminal_funcs = die App::Ack::die
[-TestingAndDebugging::ProhibitNoStrict]
[-TestingAndDebugging::ProhibitNoWarnings]
# If I've turned off warnings or strict, I know why I'm doing it.
[-TestingAndDebugging::RequireTestLabels]
[-ValuesAndExpressions::ProhibitConstantPragma]
[-ValuesAndExpressions::ProhibitEmptyQuotes]
[-ValuesAndExpressions::ProhibitFiletest_f]
[-ValuesAndExpressions::ProhibitMagicNumbers]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::RequireConstantOnLeftSideOfEquality]
[-ValuesAndExpressions::RequireConstantVersion]
[-ValuesAndExpressions::RequireInterpolationOfMetachars]
[-ValuesAndExpressions::RequireNumericVersion]
[-ValuesAndExpressions::RestrictLongStrings]
[-Variables::ProhibitLocalVars]
[-Variables::ProhibitPackageVars]
[-Variables::ProhibitPunctuationVars]
[Variables::ProhibitReusedNames]
severity = 5
[-Variables::RequireLocalizedPunctuationVars]
# We do lots of mucking with punctuation vars and @ARGV.