3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 use Test
::Dpkg
qw(:needs);
23 test_needs_module
('Test::Perl::Critic');
24 test_needs_srcdir_switch
();
27 BuiltinFunctions::ProhibitBooleanGrep
28 BuiltinFunctions::ProhibitLvalueSubstr
29 BuiltinFunctions::ProhibitReverseSortBlock
30 BuiltinFunctions::ProhibitShiftRef
31 BuiltinFunctions::ProhibitSleepViaSelect
32 BuiltinFunctions::ProhibitStringySplit
33 BuiltinFunctions::ProhibitUniversalCan
34 BuiltinFunctions::ProhibitUniversalIsa
35 BuiltinFunctions::ProhibitUselessTopic
36 BuiltinFunctions::ProhibitVoidGrep
37 BuiltinFunctions::ProhibitVoidMap
38 BuiltinFunctions::RequireBlockGrep
39 BuiltinFunctions::RequireBlockMap
40 BuiltinFunctions::RequireGlobFunction
41 BuiltinFunctions::RequireSimpleSortBlock
42 ClassHierarchies::ProhibitAutoloading
43 ClassHierarchies::ProhibitExplicitISA
44 ClassHierarchies::ProhibitOneArgBless
45 CodeLayout::ProhibitHardTabs
46 CodeLayout::ProhibitQuotedWordLists
47 CodeLayout::ProhibitTrailingWhitespace
48 CodeLayout::RequireConsistentNewlines
49 ControlStructures::ProhibitCStyleForLoops
50 ControlStructures::ProhibitLabelsWithSpecialBlockNames
51 ControlStructures::ProhibitMutatingListFunctions
52 ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions
53 ControlStructures::ProhibitUntilBlocks
54 ControlStructures::ProhibitYadaOperator
55 Documentation::RequirePackageMatchesPodName
56 Documentation::RequirePodSections
57 InputOutput::ProhibitBacktickOperators
58 InputOutput::ProhibitBarewordDirHandles
59 InputOutput::ProhibitBarewordFileHandles
60 InputOutput::ProhibitInteractiveTest
61 InputOutput::ProhibitJoinedReadline
62 InputOutput::ProhibitOneArgSelect
63 InputOutput::ProhibitReadlineInForLoop
64 InputOutput::ProhibitTwoArgOpen
65 InputOutput::RequireBracedFileHandleWithPrint
66 InputOutput::RequireCheckedOpen
67 InputOutput::RequireEncodingWithUTF8Layer
68 Miscellanea::ProhibitFormats
69 Miscellanea::ProhibitTies
70 Miscellanea::ProhibitUnrestrictedNoCritic
71 Miscellanea::ProhibitUselessNoCritic
72 Modules::ProhibitConditionalUseStatements
73 Modules::ProhibitEvilModules
74 Modules::ProhibitMultiplePackages
75 Modules::RequireBarewordIncludes
76 Modules::RequireEndWithOne
77 Modules::RequireExplicitPackage
78 Modules::RequireFilenameMatchesPackage
79 NamingConventions::Capitalization
80 NamingConventions::ProhibitAmbiguousNames
81 Objects::ProhibitIndirectSyntax
82 RegularExpressions::ProhibitCaptureWithoutTest
83 RegularExpressions::ProhibitSingleCharAlternation
84 RegularExpressions::ProhibitUnusedCapture
85 RegularExpressions::ProhibitUnusualDelimiters
86 RegularExpressions::ProhibitUselessTopic
87 RegularExpressions::RequireBracesForMultiline
88 RegularExpressions::RequireExtendedFormatting
89 Subroutines::ProhibitAmpersandSigils
90 Subroutines::ProhibitExplicitReturnUndef
91 Subroutines::ProhibitManyArgs
92 Subroutines::ProhibitNestedSubs
93 Subroutines::ProhibitReturnSort
94 Subroutines::ProhibitUnusedPrivateSubroutines
95 Subroutines::ProtectPrivateSubs
96 Subroutines::RequireArgUnpacking
97 TestingAndDebugging::ProhibitNoStrict
98 TestingAndDebugging::ProhibitNoWarnings
99 TestingAndDebugging::ProhibitProlongedStrictureOverride
100 TestingAndDebugging::RequireTestLabels
101 TestingAndDebugging::RequireUseStrict
102 TestingAndDebugging::RequireUseWarnings
103 ValuesAndExpressions::ProhibitCommaSeparatedStatements
104 ValuesAndExpressions::ProhibitComplexVersion
105 ValuesAndExpressions::ProhibitInterpolationOfLiterals
106 ValuesAndExpressions::ProhibitLongChainsOfMethodCalls
107 ValuesAndExpressions::ProhibitMismatchedOperators
108 ValuesAndExpressions::ProhibitMixedBooleanOperators
109 ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters
110 ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
111 ValuesAndExpressions::ProhibitVersionStrings
112 ValuesAndExpressions::RequireConstantVersion
113 ValuesAndExpressions::RequireQuotedHeredocTerminator
114 ValuesAndExpressions::RequireUpperCaseHeredocTerminator
115 Variables::ProhibitAugmentedAssignmentInDeclaration
116 Variables::ProhibitConditionalDeclarations
117 Variables::ProhibitLocalVars
118 Variables::ProhibitMatchVars
119 Variables::ProhibitPackageVars
120 Variables::ProhibitPerl4PackageNames
121 Variables::ProhibitUnusedVariables
122 Variables::ProtectPrivateVars
123 Variables::RequireLexicalLoopIterators
124 Variables::RequireNegativeIndices
127 Test
::Perl
::Critic
->import(
128 -profile
=> 't/critic/perlcriticrc',
130 -include
=> \
@policies,
134 my @files = Test
::Dpkg
::all_perl_files
();
136 plan tests
=> scalar @files;
138 for my $file (@files) {