mirror of
https://git.dpkg.org/git/dpkg/dupload.git
synced 2025-04-17 12:26:08 +00:00
This bogus test has been removed from upstream perlcritic, and now the code complains about an uninstalled check. Warned-by: perlcritic
114 lines
3.2 KiB
Plaintext
114 lines
3.2 KiB
Plaintext
## Perl Critic configuration file
|
|
severity = 1
|
|
verbose = %f %l:%c (Severity: %s)\n %P (%s)\n near '%r'\n%d\n
|
|
program-extensions = .pl .t
|
|
|
|
##
|
|
## Tune tests
|
|
##
|
|
|
|
[Documentation::RequirePodSections]
|
|
lib_sections = NAME | DESCRIPTION | CHANGES
|
|
script_sections = NAME | SYNOPSIS | DESCRIPTION
|
|
|
|
[RegularExpressions::ProhibitUnusualDelimiters]
|
|
allow_all_brackets = 1
|
|
|
|
[RegularExpressions::RequireBracesForMultiline]
|
|
allow_all_brackets = 1
|
|
|
|
[RegularExpressions::RequireExtendedFormatting]
|
|
minimum_regex_length_to_complain_about = 60
|
|
|
|
[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
|
|
allow_if_string_contains_single_quote = 1
|
|
|
|
##
|
|
## Disable tests
|
|
##
|
|
|
|
# Complex is not always bad.
|
|
[-BuiltinFunctions::ProhibitComplexMappings]
|
|
|
|
# Needed when generating code.
|
|
[-BuiltinFunctions::ProhibitStringyEval]
|
|
|
|
# BUG: Bogus check.
|
|
[-Documentation::PodSpelling]
|
|
|
|
# While this might be good for performance, it is bad for keeping docs updated.
|
|
[-Documentation::RequirePodAtEnd]
|
|
|
|
# Too many false positives.
|
|
[-CodeLayout::RequireTidyCode]
|
|
|
|
# Forcing this just turns into noise (depending on the context, it makes sense).
|
|
[-CodeLayout::RequireTrailingCommas]
|
|
|
|
# These are fine.
|
|
[-ControlStructures::ProhibitCascadingIfElse]
|
|
|
|
# These are fine, too many in the code base anyway.
|
|
[-ControlStructures::ProhibitPostfixControls]
|
|
|
|
# These are fine, usually as long as they are not double negations.
|
|
[-ControlStructures::ProhibitUnlessBlocks]
|
|
|
|
# BUG: Too many false positives.
|
|
[-ControlStructures::ProhibitUnreachableCode]
|
|
|
|
# TODO: Check it out, add new Dpkg::Program module?
|
|
[-InputOutput::ProhibitBacktickOperators]
|
|
|
|
# Needed, using <>/<@ARGV> is not correct, Prompt is not a core module.
|
|
[-InputOutput::ProhibitExplicitStdin]
|
|
|
|
# Here complex is meant as long, but then long is not necessarily complex.
|
|
[-Modules::ProhibitExcessMainComplexity]
|
|
|
|
# BUG: Too many false positives; non-modules all trigger.
|
|
[-Modules::RequireVersionVar]
|
|
|
|
# We work primarily with ASCII, so we need to specify the exact characters
|
|
# to match.
|
|
[-RegularExpressions::ProhibitEnumeratedClasses]
|
|
|
|
# When . is used in the code it means what it does.
|
|
[-RegularExpressions::RequireDotMatchAnything]
|
|
|
|
# When ^ or $ are used in the code they mean what they do.
|
|
[-RegularExpressions::RequireLineBoundaryMatching]
|
|
|
|
# Needed.
|
|
[-Subroutines::ProhibitSubroutinePrototypes]
|
|
|
|
# Readers need to know perl, English module is worse.
|
|
[-Variables::ProhibitPunctuationVars]
|
|
|
|
# Readers need to know perl.
|
|
[-Variables::RequireInitializationForLocalVars]
|
|
|
|
# BUG: Too many false positives; on ::main and for $ENV, $SIG, $?, $a, $b.
|
|
[-Variables::RequireLocalizedPunctuationVars]
|
|
|
|
# Readonly is not a core module.
|
|
[-ValuesAndExpressions::ProhibitConstantPragma]
|
|
|
|
# TODO: Check it out, using other quotes might be less readable and uniform.
|
|
[-ValuesAndExpressions::ProhibitEmptyQuotes]
|
|
|
|
# Using charnames is less clear.
|
|
[-ValuesAndExpressions::ProhibitEscapedCharacters]
|
|
|
|
# Used for help output.
|
|
[-ValuesAndExpressions::ProhibitImplicitNewlines]
|
|
|
|
# Octals are fine.
|
|
[-ValuesAndExpressions::ProhibitLeadingZeros]
|
|
|
|
# TODO: Check it out, some magic numbers are fine, octals for example.
|
|
[-ValuesAndExpressions::ProhibitMagicNumbers]
|
|
|
|
# BUG: False positives on long hex numbers, even when separated.
|
|
[-ValuesAndExpressions::RequireNumberSeparators]
|