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