Login
Add new policy Variables::ProhibitMatchVars
[gknop/Perl-Critic.git] / t / samples / perlcriticrc.levels
1 ##########################################################################
2 # This sample file demonstrates how to assign a custom severity level
3 # for any or all Perl::Critic policies.  Each Policy module defines
4 # its own default severity ranging from 1 (least severe) to 5 (most
5 # severe).  However, coding standards are somewhat subjective so you
6 # can change the severity to suit your own preferences by redefining it
7 # in your .perlcriticrc file.  Use the -severity option with
8 # perlcritic to set the minimum severity for Policies that are loaded
9 # into the engine.  The severity levels shown in this file are arbitrary
10 # and just used for testing.
11 ##########################################################################
12
13 #-----------------------------------------------------------------------------
14 #Severity 5: First 10 policies...
15
16 [BuiltinFunctions::ProhibitStringyEval]
17 severity = 5
18
19 [BuiltinFunctions::RequireBlockGrep]
20 severity = 5
21
22 [BuiltinFunctions::RequireBlockMap]
23 severity = 5
24
25 [CodeLayout::ProhibitParensWithBuiltins]
26 severity = 5
27
28 [ControlStructures::ProhibitCascadingIfElse]
29 max_elsif = 2
30 severity = 5
31
32 [ControlStructures::ProhibitPostfixControls]
33 allow = for if until while unless
34 severity = 5
35
36 [InputOutput::ProhibitBacktickOperators]
37 severity = 5
38
39 [Modules::ProhibitMultiplePackages]
40 severity = 5
41
42 [Modules::RequireBarewordIncludes]
43 severity = 5
44
45 [Modules::ProhibitEvilModules]
46 modules = Evil::Module SuperEvil::Module
47 severity = 5
48
49 #-----------------------------------------------------------------------------
50 #Severity 4: 10 more policies...
51
52 [Modules::RequireExplicitPackage]
53 exempt_scripts = 1
54 severity = 4
55
56 [NamingConventions::ProhibitMixedCaseSubs]
57 severity = 4
58
59 [NamingConventions::ProhibitMixedCaseVars]
60 severity = 4
61
62 [Subroutines::ProhibitBuiltinHomonyms]
63 severity = 4
64
65 [Subroutines::ProhibitExplicitReturnUndef]
66 severity = 4
67
68 [Subroutines::ProhibitSubroutinePrototypes]
69 severity = 4
70
71 [TestingAndDebugging::RequireUseStrict]
72 severity = 4
73
74 [TestingAndDebugging::RequireUseWarnings]
75 severity = 4
76
77 [ValuesAndExpressions::ProhibitConstantPragma]
78 severity = 4
79
80 [ValuesAndExpressions::ProhibitEmptyQuotes]
81 severity = 4
82
83 #-----------------------------------------------------------------------------
84 #Severity 3: 10 more policies...
85
86 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
87 severity = 3
88
89 [ValuesAndExpressions::ProhibitLeadingZeros]
90 severity = 3
91
92 [ValuesAndExpressions::ProhibitNoisyQuotes]
93 severity = 3
94
95 [ValuesAndExpressions::RequireInterpolationOfMetachars]
96 severity = 3
97
98 [ValuesAndExpressions::RequireNumberSeparators]
99 severity = 3
100
101 [ValuesAndExpressions::RequireQuotedHeredocTerminator]
102 severity = 3
103
104 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator]
105 severity = 3
106
107 [Variables::ProhibitLocalVars]
108 severity = 3
109
110 [Variables::ProhibitPackageVars]
111 severity = 3
112
113 [Variables::ProhibitPunctuationVars]
114 severity = 3
115
116 #-----------------------------------------------------------------------------
117 #Severity 2: 10 more policies...
118
119 [BuiltinFunctions::RequireGlobFunction]
120 severity = 2
121
122 [CodeLayout::ProhibitHardTabs]
123 severity = 2
124
125 [ControlStructures::ProhibitCStyleForLoops]
126 severity = 2
127
128 [ControlStructures::ProhibitUnlessBlocks]
129 severity = 2
130
131 [ControlStructures::ProhibitUntilBlocks]
132 severity = 2
133
134 [CodeLayout::RequireTrailingCommas]
135 severity = 2
136
137 [Modules::RequireVersionVar]
138 severity = 2
139
140 [CodeLayout::ProhibitQuotedWordLists]
141 severity = 2
142
143 [RegularExpressions::RequireExtendedFormatting]
144 severity = 2
145
146 [RegularExpressions::RequireLineBoundaryMatching]
147 severity = 2
148
149 #-----------------------------------------------------------------------------
150 #Severity 1: All remaining  policies...
151
152 [BuiltinFunctions::ProhibitLvalueSubstr]
153 severity = 1
154
155 [BuiltinFunctions::ProhibitSleepViaSelect]
156 severity = 1
157
158 [InputOutput::ProhibitOneArgSelect]
159 severity = 1
160
161 [ClassHierarchies::ProhibitOneArgBless]
162 severity = 1
163
164 [InputOutput::ProhibitBarewordFileHandles]
165 severity = 1
166
167 [Subroutines::RequireFinalReturn]
168 severity = 1
169
170 [Modules::RequireEndWithOne]
171 severity = 1
172
173 [Miscellanea::RequireRcsKeywords]
174 severity = 1
175
176 [InputOutput::ProhibitTwoArgOpen]
177 severity = 1
178
179 [CodeLayout::RequireTidyCode]
180 severity = 1
181
182 [NamingConventions::ProhibitAmbiguousNames]
183 severity = 1
184
185 [References::ProhibitDoubleSigils]
186 severity = 1
187
188 [TestingAndDebugging::ProhibitNoStrict]
189 severity = 1
190
191 [TestingAndDebugging::ProhibitNoWarnings]
192 severity = 1
193
194 [Subroutines::ProhibitAmpersandSigils]
195 severity = 1
196
197 [Subroutines::ProhibitExcessComplexity]
198 severity = 1
199
200 [Variables::ProhibitMatchVars]
201 severity = 1