diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-15 08:08:32 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-15 08:08:32 +0000 |
commit | c5ad5c8276579cce39ad90175633560a6fbf09bd (patch) | |
tree | ea82215a64bcd8c6d6a1d472e28b971cb82c825c /.perlcriticrc | |
parent | 8d3413c4608ed2529452c1d14e568f7f1546ce2a (diff) |
* Various minor fixes and stylistic improvements suggested by Perl::Critic.
Diffstat (limited to '.perlcriticrc')
-rw-r--r-- | .perlcriticrc | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/.perlcriticrc b/.perlcriticrc index 2c784e893..0dd5260ae 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -4,11 +4,56 @@ theme = core + pbp + cosmetic + bugs + maintenance + complexity + security # 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 = 3 +severity = 1 -# ProhibitStringyEval is broken; it doesn't take into account that -# eval q{use Foo}; -# defers the use until the eval runs. -# eval {use Foo} -# does not defer the use at all. +# 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] |