X-Git-Url: https://git.eyrie.org/?a=blobdiff_plain;f=tests%2Fdata%2Fperlcriticrc;fp=tests%2Fdata%2Fperlcriticrc;h=46436834c3101b0aa365fc416810c6f89e89fad8;hb=f661563613ed2460ac179b2b57f3913920e47088;hp=60210a9e17fb5402095e3745e56e52b2f97458df;hpb=1a7e72fd5f9369edb13258eb8414902cbcf9e295;p=kerberos%2Fkrb5-strength.git diff --git a/tests/data/perlcriticrc b/tests/data/perlcriticrc index 60210a9..4643683 100644 --- a/tests/data/perlcriticrc +++ b/tests/data/perlcriticrc @@ -10,7 +10,7 @@ # which can be found at . # # Written by Russ Allbery -# Copyright 2018-2019 Russ Allbery +# Copyright 2018-2022 Russ Allbery # Copyright 2011-2013 # The Board of Trustees of the Leland Stanford Junior University # @@ -42,6 +42,20 @@ verbose = %f:%l:%c: [%p] %m (%e, Severity: %s)\n # group coding style. [-CodeLayout::ProhibitParensWithBuiltins] +# This conflicts with Subroutines::ProhibitExplicitReturnUndef and +# Subroutines::RequireFinalReturn, and I prefer the brevity of the simple +# return statement. I don't think the empty list versus undef behavior is +# that confusing. +# +# This should be Community::EmptyReturn, which is the new name of the module, +# but currently ignores have to use the Freenode::EmptyReturn name instead. +[-Community::EmptyReturn] +[-Freenode::EmptyReturn] + +# This recommends using given/when, but Perl has marked those as experimental +# and cautions against using when. +[-ControlStructures::ProhibitCascadingIfElse] + # Stanford's coding style allows postfix unless for flow control. There # doesn't appear to be any way to allow it only for flow control (the logic # for "if" and "when" appears to be special-cased), so we have to allow unless @@ -60,9 +74,9 @@ allow = unless # of $@ even if destructors run at exit from the eval block. [-ErrorHandling::RequireCheckingReturnValueOfEval] -# The default of 9 is too small and forces weird code contortions. -[InputOutput::RequireBriefOpen] -lines = 25 +# The default of 9 is too small and forces weird code contortions. After some +# experimentation, I've never found this helpful in driving useful refactors. +[-InputOutput::RequireBriefOpen] # This is correct 80% of the time, but it isn't correct for a lot of scripts # inside packages, where maintaining $VERSION isn't worth the effort. @@ -79,6 +93,12 @@ lines = 25 # Perl 5.20). See https://github.com/Perl-Critic/Perl-Critic/issues/578. [-References::ProhibitDoubleSigils] +# Five arguments to a method has seemed reasonable at least once: a pair of +# input file data and path, a pair of output file descriptor and path, and +# a dict of additional arguments. +[Subroutines::ProhibitManyArgs] +skip_object = 1 + # I generally don't want to require Readonly as a prerequisite for all my Perl # modules. [-ValuesAndExpressions::ProhibitConstantPragma] @@ -88,15 +108,15 @@ lines = 25 # independent of the algorithm, but don't do so for mathematical formulae. [-ValuesAndExpressions::ProhibitMagicNumbers] -# Increase this to six digits so that I'm not told to add underscores to -# port numbers (which is just silly). -[ValuesAndExpressions::RequireNumberSeparators] -min_value = 100000 +# This has never triggered on anything useful and keeps telling me to add +# underscores to UNIX timestamps and port numbers, which is just silly. +[-ValuesAndExpressions::RequireNumberSeparators] # IO::Uncompress::Gunzip puts the error message in a package variable. # Text::Wrap has a broken interface that requires use of package variables. +# YAML::XS also cannot be configured without package variables. [Variables::ProhibitPackageVars] -add_packages = IO::Uncompress::Gunzip Text::Wrap +add_packages = IO::Uncompress::Gunzip Text::Wrap YAML::XS # use English was one of the worst ideas in the history of Perl. It makes the # code slightly more readable for amateurs at the cost of confusing