Merge branch 'master' into templatemove
[ikiwiki] / .perlcriticrc
1 theme = core + pbp + cosmetic + bugs + maintenance + complexity + security
2
3 # While there's good reason to not use subroutine prototypes, ikiwiki does
4 # use them, and changing away from them could lead to subtle bugs in stuff
5 # using the library. So for now, demote errors about them.
6 [Subroutines::ProhibitSubroutinePrototypes]
7 severity = 1
8
9 # Nice to have, but low priority. I do it for the hairy regexps.
10 [RegularExpressions::RequireExtendedFormatting]
11 severity = 1
12
13 # ProhibitStringyEval doesn't take into account that eval q{use Foo};
14 # defers the use until the eval runs, which is often a useful optimisation.
15 # While eval {use Foo}; does not defer the use at all.
16 [-BuiltinFunctions::ProhibitStringyEval]
17
18 # ikiwiki uses the method of switching other files to the IkiWiki package
19 # when they are part of the core program. I don't plan to have more than
20 # the one exporting module in IkiWiki, so let's ignore this test.
21 [-Modules::RequireFilenameMatchesPackage]
22 # IkiWiki also switches _out_ of the core package when a package namespace
23 # is a good way to group a set of functions. This doesn't mean I want it
24 # loading up a separate file though, so it's in the same file.
25 [-Modules::ProhibitMultiplePackages]
26
27 # ikiwiki uses this when it makes sense, ie, for conditional variable
28 # localisation.
29 [-Variables::ProhibitConditionalDeclarations]
30
31 # IkiWiki exports symbols, and uses globals, if it's bad form, that's too
32 # bad. :-)
33 [-Modules::ProhibitAutomaticExportation]
34 [-Variables::ProhibitPackageVars]
35
36 # Stylistic checks that I don't agree with. Larry put both forms there for
37 # a reason; both forms can be abused.
38 [-BuiltinFunctions::RequireBlockGrep]
39 [-BuiltinFunctions::RequireBlockMap]
40 [-Variables::ProhibitPunctuationVars]
41 [-ControlStructures::ProhibitPostfixControls]
42
43 # Sadly doesn't match my coding style.
44 [-CodeLayout::ProhibitHardTabs]
45
46 # Sillyness.
47 [-Miscellanea::RequireRcsKeywords]
48
49 # Sadly, perl doesn't offer a builtin better way in many cases.
50 [-ControlStructures::ProhibitCascadingIfElse]
51
52 # Good god, man, it's perl. Get over it!
53 [-ValuesAndExpressions::ProhibitNoisyQuotes]
54 [-ValuesAndExpressions::ProhibitEmptyQuotes]
55 [-RegularExpressions::RequireLineBoundaryMatching]
56
57 # When I use local vars, I have a damn good reason.
58 # (A shower after with lots of strong soap is also a nice thing.)
59 [-Variables::ProhibitLocalVars]