diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-09-27 22:25:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 22:25:49 +0200 |
commit | 3e13de0966e361ca4e70cfd2d781320f25d820d3 (patch) | |
tree | 9846f6a728d437ffb9829d530f12313d426f365c /.perlcriticrc | |
parent | 40c4401db5525617278deb8bfaf5481f08e4cf97 (diff) | |
download | bugzilla-3e13de0966e361ca4e70cfd2d781320f25d820d3.tar.gz bugzilla-3e13de0966e361ca4e70cfd2d781320f25d820d3.tar.xz |
Bug 1402878 - Add some more sanity-type tests, including perl critic
Diffstat (limited to '.perlcriticrc')
-rw-r--r-- | .perlcriticrc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.perlcriticrc b/.perlcriticrc new file mode 100644 index 000000000..b61acbbc5 --- /dev/null +++ b/.perlcriticrc @@ -0,0 +1,42 @@ +theme = freenode || core || certrec || certrule || performance || security +severity = 1 + +[-BuiltinFunctions::ProhibitUselessTopic] +[-ControlStructures::ProhibitCascadingIfElse] +[-ControlStructures::ProhibitPostfixControls] +[-ControlStructures::ProhibitUnlessBlocks] +[-Documentation::RequirePodLinksIncludeText] +[-Documentation::RequirePodSections] +[-ErrorHandling::RequireCarping] +[-Modules::RequireVersionVar] +[-References::ProhibitDoubleSigils] +[-RegularExpressions::ProhibitComplexRegexes] +[-RegularExpressions::RequireExtendedFormatting] +[-Subroutines::ProhibitExcessComplexity] +[-ValuesAndExpressions::ProhibitConstantPragma] +[-ValuesAndExpressions::ProhibitEmptyQuotes] +[-ValuesAndExpressions::ProhibitMagicNumbers] +[-ValuesAndExpressions::ProhibitVersionStrings] +[-Variables::ProhibitLocalVars] +[-Variables::ProhibitPackageVars] + +# this policy is broken currently +[-Freenode::PackageMatchesFilename] + +# This is not a good policy. +# Non-explicit return is often easier to read. +# think of javascript arrow functions. +[-Subroutines::RequireFinalReturn] + +# I don't agree with this policy because +# a bare return can actually cause more problems. +[-Subroutines::ProhibitExplicitReturnUndef] + +[Variables::RequireLocalizedPunctuationVars] +allow = @ARGV $ARGV %ENV %SIG + +[Variables::ProhibitPunctuationVars] +allow = $@ $! $/ $^O $^V + + + |