X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2F.perlcriticrc;h=14246309a114ed9e17541d14652fc692ad38d797;hp=bcb3507c812f2e9586686081de4a4a4fec36350e;hb=681a340f6be4184b1472a8e1fa9cd5d074f6f325;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/rt/.perlcriticrc b/rt/.perlcriticrc index bcb3507c8..14246309a 100644 --- a/rt/.perlcriticrc +++ b/rt/.perlcriticrc @@ -1,45 +1,26 @@ -# space separated list of strings to regex match against rules -exclude = Modules::RequireFilenameMatchesPackage Subroutines::ProhibitExplicitReturnUndef Subroutines::RequireArgUnpacking +# This perlcritic policy file isn't to be taken as gospel. It's just a start +# As of now, it's mostly about disabling policies we're not able to follow or +# strongly disagree with +exclude = Subroutines::ProhibitExplicitReturnUndef Modules::RequireFilenameMatchesPackage TestingAndDebugging::ProhibitNoStrict +color = 1 +verbose = 7 -# [Modules::RequireFilenameMatchesPackage] -# versions up to RT 3.8 use _Overlay files to separate generated code -# from core code, as such there are a lot of needless warnings about -# this. These were removed in 4.0 so skipping this will not be required -# -# [Subroutines::ProhibitExplicitReturnUndef] -# RT is documented to return undef in a number of places, and on a -# stable series I'm hesitant to go around changing to implicitly return -# undef. We can clean this up in 4.0 and ensure that if something -# calling us in list context really needs that explicit undef, it -# doesn't break on a minor release upgrade. -# -# [Subroutines::RequireArgUnpacking] -# RT is a big user of my $self = shift; and will continue doing so -# -# 3.8 hasn't converted to using RT->SystemUser and the like and still reaches -# for RT:: in a lot of places. Quiet that down with what seems like a slightly -# larger hammer than I would like. -# -# Eliminate globals declared with `our' or `use vars'. -[Variables::ProhibitPackageVars] -# set_themes = core maintenance pbp -# add_themes = -# severity = 3 -# maximum_violations_per_document = no_limit +# we don't unpack @_ right away as we mostly use named vars with defaults: +# sub foo { +# my $self = shift; +# my %args = ( default => 'value', ..., @_ ); +# ... +[-Subroutines::RequireArgUnpacking] -# The base set of packages to allow variables for. -# packages = Data::Dumper File::Find FindBin Log::Log4perl +# Readonly superiority is not convincing, especially considering +# that 'use constant' participates in constants folding during +# compilation +[-ValuesAndExpressions::ProhibitConstantPragma] -# The set of packages to allow variables for, in addition to those given in "packages". -add_packages = RT +# brutal +[BuiltinFunctions::RequireBlockGrep] +severity = 1 -# Write `eval { my $foo; bar($foo) }' instead of `eval "my $foo; bar($foo);"'. -[BuiltinFunctions::ProhibitStringyEval] -# set_themes = bugs core pbp -# add_themes = -# severity = 5 -# maximum_violations_per_document = no_limit - -# Allow eval of "use" and "require" strings. -allow_includes = 1 +[BuiltinFunctions::RequireBlockMap] +severity = 1