Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Fixes ControlStructures::ProhibitMutatingListFunctions.
Warned-by: perlcritic
|
|
Fixes BuiltinFunctions::ProhibitUselessTopic
and RegularExpressions::ProhibitUselessTopic.
Warned-by: perlcritic
|
|
These are false positives, as when there's no match perl will leave
the subpattern variables untouched. We'll just use the opportunity to
unconfuse perlcritic, making some of those variable usages more clear
by using intermediate variables.
Fixes RegularExpressions::ProhibitUnusedCapture.
Warned-by: perlcritic
|
|
Fixes RegularExpressions::ProhibitSingleCharAlternation.
Warned-by: perlcritic
|
|
Fixes Variables::ProhibitMatchVars.
Warned-by: perlcritic
|
|
Fixes TestingAndDebugging::RequireTestLabels.
Warned-by: perlcritic
|
|
This stops the madness of having to invent sequence numbers to be able
to order the test suite run. Instead we now honour the order of the
arguments passed to the runner.
|
|
|
|
Fixes InputOutput::RequireBracedFileHandleWithPrint.
Warned-by: perlcritic
|
|
Fixes InputOutput::RequireCheckedOpen.
Warned-by: perlcritic
|
|
Expose two functions to match a changelog header and trailer, instead
of exposing the raw regex variables.
Fixes Variables::ProhibitPackageVars.
Warned-by: perlcritic
|
|
Do not use private functions from another module, just move them to the
module where they are being used.
Fixes Subroutines::ProhibitUnusedPrivateSubroutines and
Subroutines::ProtectPrivateSubs.
Warned-by: perlcritic
|
|
Fixes CodeLayout::ProhibitHardTabs.
Warned-by: perlcritic
|
|
This gets rid of the localized $OBJDUMP variable, by explicitly passing
the overriden value to the recursive call.
Fixes Variables::ProhibitLocalVars.
|
|
Fixes BuiltinFunctions::RequireBlockGrep.
|
|
Fixes BuiltinFunctions::RequireBlockMap.
|
|
This avoids using grep on scalar context.
Fixes BuiltinFunctions::ProhibitBooleanGrep.
|
|
Fixes BuiltinFunctions::ProhibitVoidMap.
|
|
This makes the test explicit, and avoids confusing perlcritic of this
being a void grep.
Fixes BuiltinFunctions::ProhibitVoidGrep.
|
|
Fixes ValuesAndExpressions::ProhibitMixedBooleanOperators.
|
|
These are double negations which are hard to grasp at a first glance.
Fixes ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions.
|
|
This should reduce the check time significantly, as it stops checking
the program files by duplicate (for <script> and <script>.pl), and does
not scan the .git directory any longer.
|
|
This should help perlcritic discern when not to apply module checks on
programs.
|
|
|
|
Lowercase module names are reserved by convention for pragmas, and
there's really no need to diverge here from the general dpkg project
naming convention. Also make sure source package format variant names
are always in lowercase, to not allow names that would not work with
previous dpkg-source versions.
Fixes NamingConventions::Capitalization.
|
|
The variables used on a foreach loop are local to that block, so if
we wanted to use it after the loop is finished the last value would
be gone.
Fixes Variables::RequireLexicalLoopIterators.
Warned-by: perlcritic
|
|
Fixes ValuesAndExpressions::RequireNumberSeparators.
Warned-by: perlcritic
|
|
Fixes Modules::ProhibitConditionalUseStatements.
Warned-by: perlcritic
|
|
Fixes RegularExpressions::ProhibitUnusualDelimiters.
Warned-by: perlcritic
|
|
These are quite confusing, instead just rearrange the code so that we
only declare it if we are going to need the variable.
Fixes Variables::ProhibitConditionalDeclarations.
Warned-by: perlcritic
|
|
Do not fix the shlibs conffiles to avoid possible useless prompts.
Fixes CodeLayout::ProhibitTrailingWhitespace.
Warned-by: perlcritic
|
|
Fixes RegularExpressions::RequireBracesForMultiline.
Warned-by: perlcritic
|
|
Fixes ValuesAndExpressions::ProhibitCommaSeparatedStatements.
Warned-by: perlcritic
|
|
Fixes ValuesAndExpressions::ProhibitMismatchedOperators.
Warned-by: perlcritic
|
|
Fixes Objects::ProhibitIndirectSyntax.
Warned-by: perlcritic
|
|
These are very slow as the list context forces the operator to read
the entire stream before starting the loop.
Fixes InputOutput::ProhibitReadlineInForLoop.
Warned-by: perlcritic
|
|
Do not read each line to then join it, just switch on slurp mode and
do it in one go. Use the newly created function file_slurp.
Fixes InputOutput::ProhibitJoinedReadline.
Warned-by: perlcritic
|
|
Fixes BuiltinFunctions::ProhibitStringySplit.
Warned-by: perlcritic
|
|
Fixes ControlStructures::ProhibitCStyleForLoops.
Warned-by: perlcritic
|
|
Fixes Variables::ProhibitUnusedVariables.
Warned-by: perlcritic
|
|
Fixes CodeLayout::ProhibitQuotedWordLists.
Warned-by: perlcritic
|
|
Using double-quotes imposes a small performance penalty as the perl
parser needs to check if any interpolation is needed. Use double-quotes
only when the string contains single-quotes. Ideally we'd use
double-quotes too for escaped meta-characters that might otherwise be
confusing to immediately see if they need interpolation or not, but the
policy does not (currently) allow to ignore these.
Fixes ValuesAndExpressions::ProhibitInterpolationOfLiterals.
Warned-by: perlcritic
|
|
Fixes Subroutines::ProhibitReturnSort.
Warned-by: perlcritic
|
|
Even if these functions are defined inside another function, they are
still global, make them proper global functions by moving the definition
outside of the outter function and mark them explicitly as being private
by using an underscore prefix. There's no point in making these
anonymous nested functions, as they do not need to access any variable
from the outter functions.
Fixes Subroutines::ProhibitNestedSubs.
Warned-by: perlcritic
|
|
Fixes InputOutput::ProhibitBarewordFileHandles.
Warned-by: perlcritic
|
|
Fixes TestingAndDebugging::RequireUseStrict and
TestingAndDebugging::RequireUseWarnings.
Warned-by: perlcritic
|
|
Fixes InputOutput::ProhibitTwoArgOpen.
Warned-by: perlcritic
|
|
Fixes BuiltinFunctions::RequireGlobFunction.
Warned-by: perlcritic
|
|
This makes the HEREDOC quoting-style used explicit, so that it's obvious
if the code text will get interpolated or not.
Fixes ValuesAndExpressions::RequireQuotedHeredocTerminator.
Warned-by: perlcritic
|