summaryrefslogtreecommitdiffstats
path: root/.perlcriticrc
blob: 0b8e4c862aa8b62df44425052ba06e0eb8a8bedd (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
theme = freenode || core || certrec || certrule || performance || security
severity = 1

[-CodeLayout::RequireTidyCode]
#perltidyrc = .perltidyrc
#severity = 2

[InputOutput::RequireCheckedSyscalls]
severity = 2
functions = :builtins
exclude_functions = print say sleep binmode

[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
severity = 2

[Freenode::EmptyReturn]
severity = 2

[CodeLayout::RequireTrailingCommas]
severity = 2

[CodeLayout::ProhibitParensWithBuiltins]
severity = 2

[RegularExpressions::ProhibitUnusualDelimiters]
severity = 2

[-BuiltinFunctions::ProhibitUselessTopic]
[-ControlStructures::ProhibitCascadingIfElse]
[-ControlStructures::ProhibitPostfixControls]
[-ControlStructures::ProhibitUnlessBlocks]
[-Documentation::RequirePodLinksIncludeText]
[-Documentation::RequirePodSections]
[-ErrorHandling::RequireCarping]
[-InputOutput::RequireBracedFileHandleWithPrint]
[-Modules::RequireVersionVar]
[-References::ProhibitDoubleSigils]
[-RegularExpressions::ProhibitComplexRegexes]
[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireExtendedFormatting]
[-RegularExpressions::RequireLineBoundaryMatching]
[-Subroutines::ProhibitExcessComplexity]
[-ValuesAndExpressions::ProhibitConstantPragma]
[-ValuesAndExpressions::ProhibitEmptyQuotes]
[-ValuesAndExpressions::ProhibitMagicNumbers]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitVersionStrings]
[-ValuesAndExpressions::ProhibitImplicitNewlines]
[-Variables::ProhibitLocalVars]
[-Variables::ProhibitPackageVars]

# this policy is broken currently
[-Freenode::PackageMatchesFilename]

# This is not a good policy.
# Non-explicit return is often easier to read.
# think of javascript arrow functions.
[-Subroutines::RequireFinalReturn]

# This test is technically correct but I do not care.
[-InputOutput::ProhibitInteractiveTest]

# I believe in the opposite of this test.
[-InputOutput::ProhibitExplicitStdin]

# _build_* are allowed
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!_|build_)\w+

# I don't agree with this policy because
# a bare return can actually cause more problems.
[-Subroutines::ProhibitExplicitReturnUndef]

[Variables::RequireLocalizedPunctuationVars]
allow = @ARGV $ARGV %ENV %SIG

[Variables::ProhibitPunctuationVars]
allow = $@ $! $/ $^O $^V