Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools for technical analysts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
tools for technical analysts
Commits
6c64e7f6
Verified
Commit
6c64e7f6
authored
9 months ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- harden critic
parent
54fce119
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.perlcriticrc
+16
-21
16 additions, 21 deletions
.perlcriticrc
with
16 additions
and
21 deletions
.perlcriticrc
+
16
−
21
View file @
6c64e7f6
...
...
@@ -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 = 1
3
info_level = 1
0
warn_level = 1
5
info_level = 1
2
##
[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::ProhibitQualifiedSubDeclarat
ion
s
]
[
Modules::RequireExplicitInclus
ion]
severity=3
######################### should be rechecked soon #########################
[-Subroutines::ProhibitSubroutinePrototypes]
[-ValuesAndExpressions::ProhibitConstantPragma]
[-Modules::ProhibitAutomaticExportation]
[-Subroutines::ProhibitCallsToUndeclaredSubs]
[-Subroutines::ProhibitCallsToUnexportedSubs]
[-Subroutines::ProhibitSubroutinePrototypes]
[-ValuesAndExpressions::ProhibitConstantPragma]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment