forked from cpanel/elevate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.perlcriticrc
1165 lines (915 loc) · 31.1 KB
/
.perlcriticrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -------------------------------------------------------
# Generated by build-tools/generate_perlcriticrc.pl
# do not edit this file manually
# -------------------------------------------------------
severity = 4
verbose = 5
# Use `List::MoreUtils::any' instead of `grep' in boolean context.
[BuiltinFunctions::ProhibitBooleanGrep]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Map blocks should have a single statement.
[BuiltinFunctions::ProhibitComplexMappings]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Use 4-argument `substr' instead of writing `substr($foo, 2, 6) = $bar'.
[BuiltinFunctions::ProhibitLvalueSubstr]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Forbid $b before $a in sort blocks.
[BuiltinFunctions::ProhibitReverseSortBlock]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Prohibit `\shift' in code
[BuiltinFunctions::ProhibitShiftRef]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Use Time::HiRes instead of something like `select(undef, undef, undef, .05)'.
[BuiltinFunctions::ProhibitSleepViaSelect]
# Downgraded severity. Default severity: 5.
# Not enforced by cPLint.
severity = 3
# Write `eval { my $foo; bar($foo) }' instead of `eval "my $foo; bar($foo);"'.
[BuiltinFunctions::ProhibitStringyEval]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# Write `split /-/, $string' instead of `split '-', $string'.
[BuiltinFunctions::ProhibitStringySplit]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Write `eval { $foo->can($name) }' instead of `UNIVERSAL::can($foo, $name)'.
[BuiltinFunctions::ProhibitUniversalCan]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Write `eval { $foo->isa($pkg) }' instead of `UNIVERSAL::isa($foo, $pkg)'.
[BuiltinFunctions::ProhibitUniversalIsa]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Don't pass $_ to built-in functions that assume it, or to most filetest operators.
[BuiltinFunctions::ProhibitUselessTopic]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Don't use `grep' in void contexts.
[BuiltinFunctions::ProhibitVoidGrep]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Don't use `map' in void contexts.
[BuiltinFunctions::ProhibitVoidMap]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Write `grep { /$pattern/ } @list' instead of `grep /$pattern/, @list'.
[-BuiltinFunctions::RequireBlockGrep]
# Write `map { /$pattern/ } @list' instead of `map /$pattern/, @list'.
[BuiltinFunctions::RequireBlockMap]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Use `glob q{*}' instead of <*>.
[BuiltinFunctions::RequireGlobFunction]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# Sort blocks should have a single statement.
[BuiltinFunctions::RequireSimpleSortBlock]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# AUTOLOAD methods should be avoided.
[ClassHierarchies::ProhibitAutoloading]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Employ `use base' instead of `@ISA'.
[ClassHierarchies::ProhibitExplicitISA]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Write `bless {}, $class;' instead of just `bless {};'.
[ClassHierarchies::ProhibitOneArgBless]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# keep a fat comma on the same line as its quoted word
[-CodeLayout::ProhibitFatCommaNewline]
# Use spaces instead of tabs.
[-CodeLayout::ProhibitHardTabs]
# don't put if after if on same line
[-CodeLayout::ProhibitIfIfSameLine]
# Write `open $handle, $path' instead of `open($handle, $path)'.
[-CodeLayout::ProhibitParensWithBuiltins]
# Write `qw(foo bar baz)' instead of `('foo', 'bar', 'baz')'.
[-CodeLayout::ProhibitQuotedWordLists]
# Don't use whitespace at the end of lines.
[-CodeLayout::ProhibitTrailingWhitespace]
# Use the same newline through the source.
[-CodeLayout::RequireConsistentNewlines]
# require a semicolon at the end of code blocks
[-CodeLayout::RequireFinalSemicolon]
# Must run code through perltidy.
[-CodeLayout::RequireTidyCode]
# comma at end of list at newline
[-CodeLayout::RequireTrailingCommaAtNewline]
# Put a comma at the end of every multi-line list declaration, including the last one.
[-CodeLayout::RequireTrailingCommas]
# Don't use & to call subroutines
[-Community::AmpersandSubCalls]
# Don't assign an anonymous arrayref to an array
[-Community::ArrayAssignAref]
# Don't use bareword filehandles other than built-ins
[-Community::BarewordFilehandles]
# Don't declare variables conditionally
[-Community::ConditionalDeclarations]
# Don't end a subroutine with a conditional block
[-Community::ConditionalImplicitReturn]
# Avoid features that have been deprecated or removed from Perl
[-Community::DeprecatedFeatures]
# Various modules discouraged from use
[-Community::DiscouragedModules]
# Don't use $a or $b as variable names outside sort
[-Community::DollarAB]
# Don't use each to iterate through a hash
[-Community::Each]
# Don't use return with no arguments
[-Community::EmptyReturn]
# Don't call methods indirectly
[-Community::IndirectObjectNotation]
# Don't use undeclared foreach loop iterators
[-Community::LexicalForeachIterator]
# Don't loop over hashes
[-Community::LoopOnHash]
# Don't use mod_perl to write web applications
[-Community::ModPerl]
# Don't use multidimensional array emulation
[-Community::MultidimensionalArrayEmulation]
# Always use the three-argument form of open
[Community::OpenArgs]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Don't use overload without specifying a bool overload and enabling fallback
[-Community::OverloadOptions]
# Don't use POSIX without specifying an import list
[-Community::POSIXImports]
# Module files should declare a package matching the filename
[-Community::PackageMatchesFilename]
# Various modules with preferred alternatives
[-Community::PreferredAlternatives]
# Don't use function prototypes
[Community::Prototypes]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
signature_enablers = cPstrict Test::Cpanel::Policy
# Always use strict and warnings, or a module that imports these
[-Community::StrictWarnings]
# Interpreter-based threads are officially discouraged
[-Community::Threads]
# Don't write context-sensitive functions using wantarray
[Community::Wantarray]
# Upgraded severity. Default severity: 2.
# Enforced by cPLint.
severity = 4
# Scripts should not use the -w switch on the shebang line
[-Community::WarningsSwitch]
# Don't use while with implicit assignment to $_
[-Community::WhileDiamondDefaultAssignment]
# new enough "constant" module for leading underscores
[-Compatibility::ConstantLeadingUnderscore]
# new enough "constant" module for multiple constants
[-Compatibility::ConstantPragmaHash]
# new enough Gtk2 version for its constants
[-Compatibility::Gtk2Constants]
# explicit Perl version for features used
[-Compatibility::PerlMinimumVersionAndWhy]
# check Perl version declared against POD features used
[-Compatibility::PodMinimumVersion]
# don't use explicit /dev/null
[-Compatibility::ProhibitUnixDevNull]
# Provide Perl::Critic support for hunting down compile-time side effects
[-CompileTime]
# Write `for(0..20)' instead of `for($i=0; $i<=20; $i++)'.
[ControlStructures::ProhibitCStyleForLoops]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Don't write long "if-elsif-elsif-elsif-elsif...else" chains.
[ControlStructures::ProhibitCascadingIfElse]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Don't write deeply nested loops and conditionals.
[ControlStructures::ProhibitDeepNests]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Don't use labels that are the same as the special block names.
[ControlStructures::ProhibitLabelsWithSpecialBlockNames]
# Upgraded severity. Default severity: 4.
# Enforced by cPLint.
severity = 4
# Don't modify `$_' in list functions.
[ControlStructures::ProhibitMutatingListFunctions]
# Upgraded severity. Default severity: 5.
# Enforced by cPLint.
severity = 4
# Don't use operators like `not', `!~', and `le' within `until' and `unless'.
[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Write `if($condition){ do_something() }' instead of `do_something() if $condition'.
[ControlStructures::ProhibitPostfixControls]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Write `if(! $condition)' instead of `unless($condition)'.
[ControlStructures::ProhibitUnlessBlocks]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Don't write code after an unconditional `die, exit, or next'.
[ControlStructures::ProhibitUnreachableCode]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Write `while(! $condition)' instead of `until($condition)'.
[ControlStructures::ProhibitUntilBlocks]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Never use `...' in production code.
[ControlStructures::ProhibitYadaOperator]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Provides a Perl::Critic policy to ensure proper Cpanel::Exception usage
[Cpanel::CpanelExceptions]
# Upgraded severity. Default severity: 4.
# Enforced by cPLint.
severity = 4
[Cpanel::CpanelOS]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Provides a Perl::Critic policy to report invalid multidimensional hash keys
[Cpanel::MultiDimensionalArrayEmulation]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Provides a Perl::Critic policy to report unapproved exits from subroutines
[Cpanel::NoExitsFromSubroutines]
# Default severity: 4.
# Enforced by cPlint
severity = 4
allowed_after = exec fork
# Provides a Perl::Critic policy to prohibit shell unsafe qx and `` operators along with their backing readpipe operator
[Cpanel::ProhibitQxAndBackticks]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Provides a Perl::Critic policy to ensure proper tr/// usage
[Cpanel::TransliterationUsage]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Provides a Perl::Critic policy to check for error-prone Try::Tiny usage.
[Cpanel::TryTinyUsage]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# consecutive L<> links
[-Documentation::ProhibitAdjacentLinks]
# don't use C<> markup in a NAME section
[-Documentation::ProhibitBadAproposMarkup]
# don't duplicate =head names
[-Documentation::ProhibitDuplicateHeadings]
# don't duplicate L<> links in SEE ALSO
[-Documentation::ProhibitDuplicateSeeAlso]
# don't L<> link to own POD
[-Documentation::ProhibitLinkToSelf]
# avoid comma at end of section
[-Documentation::ProhibitParagraphEndComma]
# don't end a paragraph with two dots
[-Documentation::ProhibitParagraphTwoDots]
# don't leave an open bracket or paren
[-Documentation::ProhibitUnbalancedParens]
# unexpanded C<> etc markup in POD verbatim paras
[-Documentation::ProhibitVerbatimMarkup]
# require __END__ before POD at end of file
[-Documentation::RequireEndBeforeLastPod]
# markup /foo filenames
[-Documentation::RequireFilenameMarkup]
# end POD with =cut directive
[-Documentation::RequireFinalCut]
# use L<> markup on URLs in POD
[-Documentation::RequireLinkedURLs]
# The `=head1 NAME' section should match the package.
[Documentation::RequirePackageMatchesPodName]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# All POD should be after `__END__'.
[Documentation::RequirePodAtEnd]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Organize your POD into the customary sections.
[Documentation::RequirePodSections]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Use functions from Carp instead of `warn' or `die'.
[ErrorHandling::RequireCarping]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# You can't depend upon the value of `$@'/`$EVAL_ERROR' to tell whether an `eval' failed.
[ErrorHandling::RequireCheckingReturnValueOfEval]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Don't use & to call subroutines
[-Freenode::AmpersandSubCalls]
# Don't assign an anonymous arrayref to an array
[-Freenode::ArrayAssignAref]
# Don't use bareword filehandles other than built-ins
[-Freenode::BarewordFilehandles]
# Don't declare variables conditionally
[-Freenode::ConditionalDeclarations]
# Don't end a subroutine with a conditional block
[-Freenode::ConditionalImplicitReturn]
# Avoid features that have been deprecated or removed from Perl
[-Freenode::DeprecatedFeatures]
# Various modules discouraged from use
[-Freenode::DiscouragedModules]
# Don't use $a or $b as variable names outside sort
[-Freenode::DollarAB]
# Don't use each to iterate through a hash
[-Freenode::Each]
# Don't use return with no arguments
[-Freenode::EmptyReturn]
# Don't call methods indirectly
[-Freenode::IndirectObjectNotation]
# Don't use undeclared foreach loop iterators
[-Freenode::LexicalForeachIterator]
# Don't loop over hashes
[-Freenode::LoopOnHash]
# Don't use mod_perl to write web applications
[-Freenode::ModPerl]
# Don't use multidimensional array emulation
[-Freenode::MultidimensionalArrayEmulation]
# Always use the three-argument form of open
[-Freenode::OpenArgs]
# Don't use overload without specifying a bool overload and enabling fallback
[-Freenode::OverloadOptions]
# Don't use POSIX without specifying an import list
[-Freenode::POSIXImports]
# Module files should declare a package matching the filename
[-Freenode::PackageMatchesFilename]
# Various modules with preferred alternatives
[-Freenode::PreferredAlternatives]
# Don't use function prototypes
[-Freenode::Prototypes]
# Always use strict and warnings, or a module that imports these
[-Freenode::StrictWarnings]
# Interpreter-based threads are officially discouraged
[-Freenode::Threads]
# Don't write context-sensitive functions using wantarray
[-Freenode::Wantarray]
# Scripts should not use the -w switch on the shebang line
[-Freenode::WarningsSwitch]
# Don't use while with implicit assignment to $_
[-Freenode::WhileDiamondDefaultAssignment]
# Discourage stuff like `@files = `ls $directory`'.
[InputOutput::ProhibitBacktickOperators]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Write `open my $fh, q{<}, $filename;' instead of `open FH, q{<}, $filename;'.
[InputOutput::ProhibitBarewordFileHandles]
# Upgraded severity. Default severity: 5.
# Enforced by cPLint.
severity = 4
# Use "<>" or "<ARGV>" or a prompting module instead of "<STDIN>".
[-InputOutput::ProhibitExplicitStdin]
# Use prompt() instead of -t.
[InputOutput::ProhibitInteractiveTest]
# Downgraded severity. Default severity: 5.
# Not enforced by cPLint.
severity = 3
# Use `local $/ = undef' or Path::Tiny instead of joined readline.
[InputOutput::ProhibitJoinedReadline]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Never write `select($fh)'.
[InputOutput::ProhibitOneArgSelect]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Write `while( $line = <> ){...}' instead of `for(<>){...}'.
[InputOutput::ProhibitReadlineInForLoop]
# Upgraded severity. Default severity: 4.
# Enforced by cPLint.
severity = 4
# Write `open $fh, q{<}, $filename;' instead of `open $fh, "<$filename";'.
[InputOutput::ProhibitTwoArgOpen]
# Upgraded severity. Default severity: 5.
# Enforced by cPLint.
severity = 4
# Write `print {$FH} $foo, $bar;' instead of `print $FH $foo, $bar;'.
[InputOutput::RequireBracedFileHandleWithPrint]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Close filehandles as soon as possible after opening them.
[-InputOutput::RequireBriefOpen]
# Write `my $error = close $fh;' instead of `close $fh;'.
[InputOutput::RequireCheckedClose]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Write `my $error = open $fh, $mode, $filename;' instead of `open $fh, $mode, $filename;'.
[InputOutput::RequireCheckedOpen]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Return value of flagged function ignored.
[InputOutput::RequireCheckedSyscalls]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Write `open $fh, q{<:encoding(UTF-8)}, $filename;' instead of `open $fh, q{<:utf8}, $filename;'.
[InputOutput::RequireEncodingWithUTF8Layer]
# Upgraded severity. Default severity: 5.
# Enforced by cPLint.
severity = 4
# Do not use `format'.
[Miscellanea::ProhibitFormats]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Do not use `tie'.
[Miscellanea::ProhibitTies]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Forbid a bare `## no critic'
[Miscellanea::ProhibitUnrestrictedNoCritic]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Remove ineffective "## no critic" annotations.
[Miscellanea::ProhibitUselessNoCritic]
# Upgraded severity. Default severity: 2.
# Enforced by cPLint.
severity = 4
# check placeholder names in Locale::TextDomain calls
[-Miscellanea::TextDomainPlaceholders]
# check for Locale::TextDomain imported but unused
[-Miscellanea::TextDomainUnused]
# Export symbols via `@EXPORT_OK' or `%EXPORT_TAGS' instead of `@EXPORT'.
[Modules::ProhibitAutomaticExportation]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Avoid putting conditional logic around compile-time includes.
[Modules::ProhibitConditionalUseStatements]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
# Ban modules that aren't blessed by your shop.
[Modules::ProhibitEvilModules]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# Minimize complexity in code that is outside of subroutines.
[-Modules::ProhibitExcessMainComplexity]
# don't put a #! line at the start of a module file
[-Modules::ProhibitModuleShebang]
# Put packages (especially subclasses) in separate files.
[-Modules::ProhibitMultiplePackages]
# don't import the whole of POSIX into a module
[-Modules::ProhibitPOSIXimport]
# avoid quoted version number string in a "use" statement
[-Modules::ProhibitUseQuotedVersion]
# Write `require Module' instead of `require 'Module.pm''.
[Modules::RequireBarewordIncludes]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# End each module with an explicitly `1;' instead of some funky expression.
[Modules::RequireEndWithOne]
# Downgraded severity. Default severity: 4.
# Not enforced by cPLint.
severity = 3
[-Modules::RequireExplicitInclusion]
# Always make the `package' explicit.
[Modules::RequireExplicitPackage]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Package declaration must match filename.
[Modules::RequireFilenameMatchesPackage]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# `use English' must be passed a `-no_match_vars' argument.
[Modules::RequireNoMatchVarsWithUseEnglish]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Give every module a `$VERSION' number.
[Modules::RequireVersionVar]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Distinguish different program components by case.
[NamingConventions::Capitalization]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Don't use vague variable or subroutine names like 'last' or 'record'.
[NamingConventions::ProhibitAmbiguousNames]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Prohibit indirect object call syntax.
[Objects::ProhibitIndirectSyntax]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Write `@{ $array_ref }' instead of `@$array_ref'.
[References::ProhibitDoubleSigils]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Capture variable used outside conditional.
[RegularExpressions::ProhibitCaptureWithoutTest]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Split long regexps into smaller `qr//' chunks.
[RegularExpressions::ProhibitComplexRegexes]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Use named character classes instead of explicit character lists.
[RegularExpressions::ProhibitEnumeratedClasses]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Use character classes for literal meta-characters instead of escapes.
[RegularExpressions::ProhibitEscapedMetacharacters]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Use `eq' or hash instead of fixed-pattern regexps.
[RegularExpressions::ProhibitFixedStringMatches]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Use `[abc]' instead of `a|b|c'.
[RegularExpressions::ProhibitSingleCharAlternation]
# Upgraded severity. Default severity: 1.
# Enforced by cPLint.
severity = 4
# Only use a capturing group if you plan to use the captured value.
[RegularExpressions::ProhibitUnusedCapture]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Use only `//' or `{}' to delimit regexps.
[RegularExpressions::ProhibitUnusualDelimiters]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Don't use $_ to match against regexes.
[RegularExpressions::ProhibitUselessTopic]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Use `{' and `}' to delimit multi-line regexps.
[RegularExpressions::RequireBracesForMultiline]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Always use the `/s' modifier with regular expressions.
[RegularExpressions::RequireDotMatchAnything]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Always use the `/x' modifier with regular expressions.
[RegularExpressions::RequireExtendedFormatting]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Always use the `/m' modifier with regular expressions.
[RegularExpressions::RequireLineBoundaryMatching]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Don't call functions with a leading ampersand sigil.
[Subroutines::ProhibitAmpersandSigils]
# Upgraded severity. Default severity: 2.
# Enforced by cPLint.
severity = 4
# Don't declare your own `open' function.
[Subroutines::ProhibitBuiltinHomonyms]
# Downgraded severity. Default severity: 4.
# Not enforced by cPLint.
severity = 3
[-Subroutines::ProhibitCallsToUndeclaredSubs]
[-Subroutines::ProhibitCallsToUnexportedSubs]
# Minimize complexity by factoring code into smaller subroutines.
[Subroutines::ProhibitExcessComplexity]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
max_mccabe = 30
# Return failure with bare `return' instead of `return undef'.
[-Subroutines::ProhibitExplicitReturnUndef]
[-Subroutines::ProhibitExportingUndeclaredSubs]
# Too many arguments.
[Subroutines::ProhibitManyArgs]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
skip_object = 1
# `sub never { sub correct {} }'.
[Subroutines::ProhibitNestedSubs]
# Default severity: 5.
# Enforced by cPlint
severity = 5
[Subroutines::ProhibitQualifiedSubDeclarations]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Behavior of `sort' is not defined if called in scalar context.
[Subroutines::ProhibitReturnSort]
# Default severity: 5.
# Enforced by cPlint
severity = 5
# Don't write `sub my_function (@@) {}'.
[-Subroutines::ProhibitSubroutinePrototypes]
# Prevent unused private subroutines.
[Subroutines::ProhibitUnusedPrivateSubroutines]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Prevent access to private subs in other packages.
[Subroutines::ProtectPrivateSubs]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Always unpack `@_' first.
[Subroutines::RequireArgUnpacking]
# Default severity: 4.
# Enforced by cPlint
severity = 4
short_subroutine_statements = 4
# End every path through a subroutine with an explicit `return' statement.
[Subroutines::RequireFinalReturn]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# Prohibit various flavors of `no strict'.
[TestingAndDebugging::ProhibitNoStrict]
# Upgraded severity. Default severity: 5.
# Enforced by cPLint.
severity = 4
allow = refs
# Prohibit various flavors of `no warnings'.
[TestingAndDebugging::ProhibitNoWarnings]
# Default severity: 4.
# Enforced by cPlint
severity = 4
allow = once redefine numeric
# Don't turn off strict for large blocks of code.
[-TestingAndDebugging::ProhibitProlongedStrictureOverride]
# Tests should all have labels.
[TestingAndDebugging::RequireTestLabels]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Always `use strict'.
[TestingAndDebugging::RequireUseStrict]
# Upgraded severity. Default severity: 5.
# Enforced by cPLint.
severity = 4
equivalent_modules = cPstrict Test::Cpanel::Policy Moo Moose
# Always `use warnings'.
[TestingAndDebugging::RequireUseWarnings]
# Default severity: 4.
# Enforced by cPlint
severity = 4
equivalent_modules = cPstrict Test::Cpanel::Policy Moo Moose
# Ban next/last/return in Try::Tiny blocks
[TryTiny::ProhibitExitingSubroutine]
# Default severity: 4.
# Enforced by cPlint
severity = 4
# disallow bareword before <
[-ValuesAndExpressions::ConstantBeforeLt]
# logical not used with compare
[-ValuesAndExpressions::NotWithCompare]
# don't assign an anonymous arrayref to an array
[-ValuesAndExpressions::ProhibitArrayAssignAref]
# don't use Foo:: style barewords
[-ValuesAndExpressions::ProhibitBarewordDoubleColon]
# Don't use the comma operator as a statement separator.
[ValuesAndExpressions::ProhibitCommaSeparatedStatements]
# Default severity: 4.
# Enforced by cPlint
severity = 4
allow_last_statement_to_be_comma_separated_in_map_and_grep = 1
# Prohibit version values from outside the module.
[ValuesAndExpressions::ProhibitComplexVersion]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Don't `use constant FOO => 15'.
[-ValuesAndExpressions::ProhibitConstantPragma]
# disallow duplicate literal hash keys
[-ValuesAndExpressions::ProhibitDuplicateHashKeys]
# disallow empty consecutive commas
[-ValuesAndExpressions::ProhibitEmptyCommas]
# Write `q{}' instead of `'''.
[ValuesAndExpressions::ProhibitEmptyQuotes]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Write `"\N{DELETE}"' instead of `"\x7F"', etc.
[ValuesAndExpressions::ProhibitEscapedCharacters]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# don't use the -f file test
[-ValuesAndExpressions::ProhibitFiletest_f]
# Use concatenation or HEREDOCs instead of literal line breaks in strings.
[ValuesAndExpressions::ProhibitImplicitNewlines]
# Default severity: 3.
# Not enforced by cPlint
severity = 3
# Always use single quotes for literal strings.
[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
# Default severity: 1.
# Not enforced by cPlint
severity = 1
# Write `oct(755)' instead of `0755'.
[-ValuesAndExpressions::ProhibitLeadingZeros]
# Long chains of method calls indicate tightly coupled code.
[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls]
# Default severity: 2.
# Not enforced by cPlint
severity = 2
# Don't use values that don't explain themselves.
[ValuesAndExpressions::ProhibitMagicNumbers]
# Default severity: 2.
# Not enforced by cPlint