You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.perlcriticrc 2.3KB

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