Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Add perlcritic and perltidy config files
Browse files Browse the repository at this point in the history
  • Loading branch information
schwern committed Jan 22, 2010
1 parent 20d9104 commit f558f73
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .perlcriticrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Change the default message to show the policy name so we can shut it up if necessary
verbose = %m [%p] at %f line %l, near '%r'\n

# Force perlcritic to use color, even when run through a pager.
color = 1

# Use a pager.
pager = $PAGER

# Nuthin wrong with any of these.
[-BuiltinFunctions::RequireBlockMap]
[-BuiltinFunctions::RequireBlockGrep]
[-ValuesAndExpressions::ProhibitEmptyQuotes]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitInterpolationOfLiterals]
[-Variables::RequireInitializationForLocalVars]
[-Variables::ProhibitPunctuationVars]
[-ControlStructures::ProhibitPostfixControls]
[-References::ProhibitDoubleSigils]
[-Documentation::RequirePodAtEnd]
[-Modules::ProhibitAutomaticExportation]

# RCS keywords? Get real.
[-Miscellanea::RequireRcsKeywords]

# No point putting a /x on really short regexes.
[RegularExpressions::RequireExtendedFormatting]
minimum_regex_length_to_complain_about = 5

# Extend the ability to play with @_ to 3 line subroutines.
[Subroutines::RequireArgUnpacking]
short_subroutine_statements = 3

# Inform perlcritic that Mouse turns on strictures
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Mouse

[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Mouse
16 changes: 16 additions & 0 deletions .perltidyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--maximum-line-length=100 # we have widescreen now
--indent-columns=4
--continuation-indentation=2
--no-opening-sub-brace-on-new-line
--paren-tightness=1
--square-bracket-tightness=1
--brace-tightness=1
--no-space-for-semicolon
--no-outdent-long-quotes
--output-line-ending=unix
--no-outdent-labels
--no-blanks-before-comments
--blanks-before-subs
--blanks-before-blocks
--nospace-after-keyword="my local our and or eq ne if else elsif until unless while for foreach return switch case given when"
--want-break-before="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="

0 comments on commit f558f73

Please sign in to comment.