Skip to content
Snippets Groups Projects
Verified Commit 6c64e7f6 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- harden critic

parent 54fce119
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ only = 0
force = 0
verbose = 8
top = 10
#theme = (core || pbp || security || bugs || complexity || maintenance || cosmetic || pulp || bangs ||certrec || certrule ) && !more
theme = (core || pbp || security || bugs || complexity || maintenance || cosmetic || pulp || bangs ||certrec || certrule ) && !more
# more
color = 1
# Tell us which rule this violated, so we can tell it to get lost
......@@ -37,9 +37,6 @@ above_version = 5.031
[-ValuesAndExpressions::ProhibitEmptyQuotes]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitNullStatements]
[-ValuesAndExpressions::ProhibitVersionStrings]
# reverse sort @array is indeed better than
# sort { $b cmp $a } @array
# I'm not so sure about hating on $b vs $a in e.g.
......@@ -63,9 +60,7 @@ above_version = 5.031
# We throw structured exceptions all the time. Carp would be a bad idea
# here.
[-ErrorHandling::RequireCarping]
[-ErrorHandling::RequireUseOfExceptions]
[-Perlsecret]
###
[Bangs::ProhibitDebuggingModules]
......@@ -74,17 +69,14 @@ above_version = 5.031
exceptions = md5 utf8 sha1 sha2 sha512
severity = 3
##
[BuiltinFunctions::ProhibitStringyEval]
allow_includes = 1
##
[CodeLayout::RequireConsistentNewlines]
##
# the values for cognitive complexity are tuned. Sometimes you have several if-statements, which could not be replaced
# by other constructs. See 'validate()' in SLUB::LZA::BagIt (score=17) for example.
[CognitiveComplexity::ProhibitExcessCognitiveComplexity]
severity = 5
warn_level = 13
info_level = 10
warn_level = 15
info_level = 12
##
[CompileTime]
##
......@@ -93,12 +85,18 @@ above_version = 5.031
max_elsif = 3
##
[ControlStructures::ProhibitMutatingListFunctions]
severity = 3
list_funcs = grep List::Util::first
severity = 5
##
[ControlStructures::ProhibitPostfixControls]
allow = if unless
severity = cruel
##
[ErrorHandling::RequireCarping]
allow_messages_ending_with_newlines = 0
allow_in_main_unless_in_subroutine = 1
severity = 3
##
[InputOutput::ProhibitBacktickOperators]
##
[InputOutput::ProhibitExplicitStdin]
......@@ -110,6 +108,7 @@ above_version = 5.031
##
[Miscellanea::ProhibitUnrestrictedNoCritic]
severity = 4
[Perlsecret]
##
[RegularExpressions::ProhibitCaptureWithoutTest]
severity = 5
......@@ -128,7 +127,7 @@ above_version = 5.031
# Builders are pulled in from Moose, but perlcritic can't possibly begin
# to fathom that out. So let these things slide.
[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build)\w+
private_name_regex = _(?!build)\w+
##
[Subroutines::RequireArgUnpacking]
short_subroutine_statements = 2
......@@ -232,18 +231,14 @@ max_chain_length = 5
[TooMuchCode::ProhibitUnusedImport]
severity=3
[TooMuchCode::ProhibitUnusedInclude]
severity=3
[Modules::RequireExplicitInclusion]
severity=3
[Perlsecret]
[Subroutines::ProhibitQualifiedSubDeclarations]
[Modules::RequireExplicitInclusion]
severity=3
######################### should be rechecked soon #########################
[-Subroutines::ProhibitSubroutinePrototypes]
[-ValuesAndExpressions::ProhibitConstantPragma]
[-Modules::ProhibitAutomaticExportation]
[-Subroutines::ProhibitCallsToUndeclaredSubs]
[-Subroutines::ProhibitCallsToUnexportedSubs]
[-Subroutines::ProhibitSubroutinePrototypes]
[-ValuesAndExpressions::ProhibitConstantPragma]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment