-
Notifications
You must be signed in to change notification settings - Fork 48
/
.perlcriticrc
59 lines (47 loc) · 2.29 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
theme = core + pbp + cosmetic + bugs + maintenance + complexity + security
# While there's good reason to not use subroutine prototypes, ikiwiki does
# use them, and changing away from them could lead to subtle bugs in stuff
# using the library. So for now, demote errors about them.
[Subroutines::ProhibitSubroutinePrototypes]
severity = 1
# Nice to have, but low priority. I do it for the hairy regexps.
[RegularExpressions::RequireExtendedFormatting]
severity = 1
# ProhibitStringyEval doesn't take into account that eval q{use Foo};
# defers the use until the eval runs, which is often a useful optimisation.
# While eval {use Foo}; does not defer the use at all.
[-BuiltinFunctions::ProhibitStringyEval]
# ikiwiki uses the method of switching other files to the IkiWiki package
# when they are part of the core program. I don't plan to have more than
# the one exporting module in IkiWiki, so let's ignore this test.
[-Modules::RequireFilenameMatchesPackage]
# IkiWiki also switches _out_ of the core package when a package namespace
# is a good way to group a set of functions. This doesn't mean I want it
# loading up a separate file though, so it's in the same file.
[-Modules::ProhibitMultiplePackages]
# ikiwiki uses this when it makes sense, ie, for conditional variable
# localisation.
[-Variables::ProhibitConditionalDeclarations]
# IkiWiki exports symbols, and uses globals, if it's bad form, that's too
# bad. :-)
[-Modules::ProhibitAutomaticExportation]
[-Variables::ProhibitPackageVars]
# Stylistic checks that I don't agree with. Larry put both forms there for
# a reason; both forms can be abused.
[-BuiltinFunctions::RequireBlockGrep]
[-BuiltinFunctions::RequireBlockMap]
[-Variables::ProhibitPunctuationVars]
[-ControlStructures::ProhibitPostfixControls]
# Sadly doesn't match my coding style.
[-CodeLayout::ProhibitHardTabs]
# Sillyness.
[-Miscellanea::RequireRcsKeywords]
# Sadly, perl doesn't offer a builtin better way in many cases.
[-ControlStructures::ProhibitCascadingIfElse]
# Good god, man, it's perl. Get over it!
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitEmptyQuotes]
[-RegularExpressions::RequireLineBoundaryMatching]
# When I use local vars, I have a damn good reason.
# (A shower after with lots of strong soap is also a nice thing.)
[-Variables::ProhibitLocalVars]