forked from openfoodfacts/openfoodfacts-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.perlcriticrc
71 lines (56 loc) · 2.17 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
# set severity to 1, allowing for everything, then explicitly allow with only
severity = 1
color = 1
only = 1
# severity 5:
[BuiltinFunctions::ProhibitSleepViaSelect]
[BuiltinFunctions::ProhibitStringyEval]
[BuiltinFunctions::RequireGlobFunction]
[ClassHierarchies::ProhibitOneArgBless]
[ControlStructures::ProhibitMutatingListFunctions]
[InputOutput::ProhibitBarewordFileHandles]
[InputOutput::ProhibitInteractiveTest]
[InputOutput::ProhibitTwoArgOpen]
[InputOutput::RequireEncodingWithUTF8Layer]
[Modules::ProhibitEvilModules]
[Modules::RequireBarewordIncludes]
[Modules::RequireFilenameMatchesPackage]
[Subroutines::ProhibitExplicitReturnUndef]
[Subroutines::ProhibitNestedSubs]
[Subroutines::ProhibitReturnSort]
# This can be included soon now that https://github.com/openfoodfacts/openfoodfacts-server/pull/7009 is merged
[-Subroutines::ProhibitSubroutinePrototypes]
[TestingAndDebugging::ProhibitNoStrict]
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Modern::Perl # remove this when all updated to ProductOpener::PerlStandards
equivalent_modules = ProductOpener::PerlStandards
[ValuesAndExpressions::ProhibitLeadingZeros]
[Variables::ProhibitConditionalDeclarations]
[Variables::RequireLexicalLoopIterators]
# /end severity 5
# severity 4 was not actually being run because severity was set to 5.
# severity 4
[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Modern::Perl
equivalent_modules = ProductOpener::PerlStandards
[Subroutines::RequireFinalReturn]
[BuiltinFunctions::RequireBlockMap]
[BuiltinFunctions::RequireBlockGrep]
[ValuesAndExpressions::ProhibitMixedBooleanOperators]
# Allow `$`', `$&', `$'', because since Perl 5.20.0
# there are no performance implications any more.
[-Variables::ProhibitMatchVars]
# /end severity 4
# severity 3
# Note: we want to tighten these rules on max_nests and max_elsif.
# But first we have to refactor non conforming code or add critic exceptions
[ControlStructures::ProhibitDeepNests]
max_nests = 11
[ControlStructures::ProhibitCascadingIfElse]
max_elsif = 13
[Variables::ProhibitUnusedVariables]
# /end severity 3
# severity 1
[Documentation::PodSpelling]
stop_words_file = stop_words.txt
# /end severity 1