-
Notifications
You must be signed in to change notification settings - Fork 14
/
perlcritic.rc
1459 lines (1083 loc) · 52.2 KB
/
perlcritic.rc
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
# Globals
severity = 1
# force = 0
# only = 0
# allow-unsafe = 0
# profile-strictness = warn
# color = 0
# pager =
# top = 0
# verbose = 4
# include =
# exclude =
# single-policy =
# theme =
# color-severity-highest = bold red
# color-severity-high = magenta
# color-severity-medium =
# color-severity-low =
# color-severity-lowest =
# program-extensions =
# Use `List::MoreUtils::any' instead of `grep' in boolean context.
[BuiltinFunctions::ProhibitBooleanGrep]
# set_themes = core pbp performance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Map blocks should have a single statement.
[BuiltinFunctions::ProhibitComplexMappings]
# set_themes = complexity core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum number of statements to allow within a map block.
# Minimum value 1. No maximum.
# max_statements = 1
# Use 4-argument `substr' instead of writing `substr($foo, 2, 6) = $bar'.
[BuiltinFunctions::ProhibitLvalueSubstr]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Forbid $b before $a in sort blocks.
[BuiltinFunctions::ProhibitReverseSortBlock]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Use Time::HiRes instead of something like `select(undef, undef, undef, .05)'.
[BuiltinFunctions::ProhibitSleepViaSelect]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Write `eval { my $foo; bar($foo) }' instead of `eval "my $foo; bar($foo);"'.
[BuiltinFunctions::ProhibitStringyEval]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Allow eval of "use" and "require" strings.
# allow_includes = 0
# Write `split /-/, $string' instead of `split '-', $string'.
[BuiltinFunctions::ProhibitStringySplit]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Write `eval { $foo->can($name) }' instead of `UNIVERSAL::can($foo, $name)'.
[BuiltinFunctions::ProhibitUniversalCan]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Write `eval { $foo->isa($pkg) }' instead of `UNIVERSAL::isa($foo, $pkg)'.
[BuiltinFunctions::ProhibitUniversalIsa]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Don't use `grep' in void contexts.
[BuiltinFunctions::ProhibitVoidGrep]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Don't use `map' in void contexts.
[BuiltinFunctions::ProhibitVoidMap]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Write `grep { $_ =~ /$pattern/ } @list' instead of `grep /$pattern/, @list'.
[BuiltinFunctions::RequireBlockGrep]
# set_themes = bugs core pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Write `map { $_ =~ /$pattern/ } @list' instead of `map /$pattern/, @list'.
[BuiltinFunctions::RequireBlockMap]
# set_themes = bugs core pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Use `glob q{*}' instead of <*>.
[BuiltinFunctions::RequireGlobFunction]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Sort blocks should have a single statement.
[BuiltinFunctions::RequireSimpleSortBlock]
# set_themes = complexity core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# AUTOLOAD methods should be avoided.
[ClassHierarchies::ProhibitAutoloading]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Employ `use base' instead of `@ISA'.
[ClassHierarchies::ProhibitExplicitISA]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Write `bless {}, $class;' instead of just `bless {};'.
[ClassHierarchies::ProhibitOneArgBless]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Use spaces instead of tabs.
[CodeLayout::ProhibitHardTabs]
# set_themes = core cosmetic
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Allow hard tabs before first non-whitespace character.
# allow_leading_tabs = 1
# Write `open $handle, $path' instead of `open($handle, $path)'.
[CodeLayout::ProhibitParensWithBuiltins]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Write `qw(foo bar baz)' instead of `('foo', 'bar', 'baz')'.
[CodeLayout::ProhibitQuotedWordLists]
# set_themes = core cosmetic
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# The minimum number of words in a list that will be complained about.
# Minimum value 1. No maximum.
# min_elements = 2
# Complain even if there are non-word characters in the values.
# strict = 0
# Don't use whitespace at the end of lines.
[CodeLayout::ProhibitTrailingWhitespace]
# set_themes = core maintenance
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Use the same newline through the source.
[CodeLayout::RequireConsistentNewlines]
# set_themes = bugs core
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Must run code through perltidy.
[-CodeLayout::RequireTidyCode]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# The Perl::Tidy configuration file to use, if any.
# perltidyrc =
# Put a comma at the end of every multi-line list declaration, including the last one.
[CodeLayout::RequireTrailingCommas]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Write `for(0..20)' instead of `for($i=0; $i<=20; $i++)'.
[ControlStructures::ProhibitCStyleForLoops]
# set_themes = core maintenance pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Don't write long "if-elsif-elsif-elsif-elsif...else" chains.
[ControlStructures::ProhibitCascadingIfElse]
# set_themes = complexity core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum number of alternatives that will be allowed.
# Minimum value 1. No maximum.
max_elsif = 6
# Don't write deeply nested loops and conditionals.
[ControlStructures::ProhibitDeepNests]
# set_themes = complexity core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum number of nested constructs to allow.
# Minimum value 1. No maximum.
max_nests = 6
# Don't use labels that are the same as the special block names.
[ControlStructures::ProhibitLabelsWithSpecialBlockNames]
# set_themes = bugs core
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Don't modify `$_' in list functions.
[ControlStructures::ProhibitMutatingListFunctions]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# The base set of functions to check.
# list_funcs = map grep List::Util::first List::MoreUtils::any List::MoreUtils::all List::MoreUtils::none List::MoreUtils::notall List::MoreUtils::true List::MoreUtils::false List::MoreUtils::firstidx List::MoreUtils::first_index List::MoreUtils::lastidx List::MoreUtils::last_index List::MoreUtils::insert_after List::MoreUtils::insert_after_string
# The set of functions to check, in addition to those given in list_funcs.
# add_list_funcs =
# Don't use operators like `not', `!~', and `le' within `until' and `unless'.
[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Write `if($condition){ do_something() }' instead of `do_something() if $condition'.
[ControlStructures::ProhibitPostfixControls]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# The permitted postfix controls.
# Valid values: for, foreach, if, unless, until, when, while.
# allow =
# The exempt flow control functions.
# flowcontrol = carp cluck confess croak die exit goto warn
# Write `if(! $condition)' instead of `unless($condition)'.
[ControlStructures::ProhibitUnlessBlocks]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Don't write code after an unconditional `die, exit, or next'.
[ControlStructures::ProhibitUnreachableCode]
# set_themes = bugs core
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Write `while(! $condition)' instead of `until($condition)'.
[ControlStructures::ProhibitUntilBlocks]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Check your spelling.
[-Documentation::PodSpelling]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# The command to invoke to check spelling.
# spell_command = aspell list
# The words to not consider as misspelled.
# stop_words =
# A file containing words to not consider as misspelled.
# stop_words_file =
# The `=head1 NAME' section should match the package.
[Documentation::RequirePackageMatchesPodName]
# set_themes = core cosmetic
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# All POD should be after `__END__'.
[Documentation::RequirePodAtEnd]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Provide text to display with your pod links.
[Documentation::RequirePodLinksIncludeText]
# set_themes = core maintenance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Allow external sections without text.
# allow_external_sections = 1
# Allow internal sections without text.
# allow_internal_sections = 1
# Organize your POD into the customary sections.
[Documentation::RequirePodSections]
# set_themes = core maintenance pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# The sections to require for modules (separated by qr/\s* [|] \s*/xms).
lib_sections = NAME | SYNOPSIS | DESCRIPTION | SUBROUTINES/METHODS | DIAGNOSTICS | BUGS | SUPPORT | LICENSE AND COPYRIGHT | AUTHOR
# The sections to require for programs (separated by qr/\s* [|] \s*/xms).
script_sections = NAME | SYNOPSIS | DESCRIPTION | REQUIRED ARGUMENTS | OPTIONS | EXIT STATUS | BUGS | SUPPORT | LICENSE AND COPYRIGHT | AUTHOR
# The origin of sections to use.
# Valid values: book, book_first_edition, module_starter_pbp, module_starter_pbp_0_0_3.
# source = book_first_edition
# The spelling of sections to use.
# Valid values: en_AU, en_US.
# language =
# Use functions from Carp instead of `warn' or `die'.
[ErrorHandling::RequireCarping]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Don't complain about die or warn if the message ends in a newline.
# allow_messages_ending_with_newlines = 1
# Don't complain about die or warn in main::, unless in a subroutine.
# allow_in_main_unless_in_subroutine = 0
# You can't depend upon the value of `$@'/`$EVAL_ERROR' to tell whether an `eval' failed.
[ErrorHandling::RequireCheckingReturnValueOfEval]
# set_themes = bugs core
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Discourage stuff like `@files = `ls $directory`'.
[InputOutput::ProhibitBacktickOperators]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Allow backticks everywhere except in void contexts.
# only_in_void_context =
# Write `open my $fh, q{<}, $filename;' instead of `open FH, q{<}, $filename;'.
[InputOutput::ProhibitBarewordFileHandles]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Use "<>" or "<ARGV>" or a prompting module instead of "<STDIN>".
[InputOutput::ProhibitExplicitStdin]
# set_themes = core maintenance pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Use prompt() instead of -t.
[InputOutput::ProhibitInteractiveTest]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Use `local $/ = undef' or File::Slurp instead of joined readline.
[InputOutput::ProhibitJoinedReadline]
# set_themes = core pbp performance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Never write `select($fh)'.
[InputOutput::ProhibitOneArgSelect]
# set_themes = bugs core pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Write `while( $line = <> ){...}' instead of `for(<>){...}'.
[InputOutput::ProhibitReadlineInForLoop]
# set_themes = bugs core pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Write `open $fh, q{<}, $filename;' instead of `open $fh, "<$filename";'.
[InputOutput::ProhibitTwoArgOpen]
# set_themes = bugs core pbp security
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Write `print {$FH} $foo, $bar;' instead of `print $FH $foo, $bar;'.
[InputOutput::RequireBracedFileHandleWithPrint]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Close filehandles as soon as possible after opening them.
[InputOutput::RequireBriefOpen]
# set_themes = core maintenance pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# The maximum number of lines between an open() and a close().
# Minimum value 1. No maximum.
# lines = 9
# Write `my $error = close $fh;' instead of `close $fh;'.
[InputOutput::RequireCheckedClose]
# set_themes = core maintenance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Write `my $error = open $fh, $mode, $filename;' instead of `open $fh, $mode, $filename;'.
[InputOutput::RequireCheckedOpen]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Return value of flagged function ignored.
[-InputOutput::RequireCheckedSyscalls]
# set_themes = core maintenance
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# The set of functions to require checking the return value of.
# functions = open close print say
# The set of functions to not require checking the return value of.
# exclude_functions =
# Write `open $fh, q{<:encoding(UTF-8)}, $filename;' instead of `open $fh, q{{<:utf8}, $filename;'.
[InputOutput::RequireEncodingWithUTF8Layer]
# set_themes = bugs core security
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Do not use `format'.
[Miscellanea::ProhibitFormats]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Do not use `tie'.
[Miscellanea::ProhibitTies]
# set_themes = core maintenance pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Forbid a bare `## no critic'
[Miscellanea::ProhibitUnrestrictedNoCritic]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Remove ineffective "## no critic" annotations.
[Miscellanea::ProhibitUselessNoCritic]
# set_themes = core maintenance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Export symbols via `@EXPORT_OK' or `%EXPORT_TAGS' instead of `@EXPORT'.
[Modules::ProhibitAutomaticExportation]
# set_themes = bugs core
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Avoid putting conditional logic around compile-time includes.
[Modules::ProhibitConditionalUseStatements]
# set_themes = bugs core
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Ban modules that aren't blessed by your shop.
[Modules::ProhibitEvilModules]
# set_themes = bugs core
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# The names of or patterns for modules to forbid.
# modules = Class::ISA {Found use of Class::ISA. This module is deprecated by the Perl 5 Porters.} Pod::Plainer {Found use of Pod::Plainer. This module is deprecated by the Perl 5 Porters.} Shell {Found use of Shell. This module is deprecated by the Perl 5 Porters.} Switch {Found use of Switch. This module is deprecated by the Perl 5 Porters.}
# A file containing names of or patterns for modules to forbid.
# modules_file =
# Minimize complexity in code that is outside of subroutines.
[Modules::ProhibitExcessMainComplexity]
# set_themes = complexity core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum complexity score allowed.
# Minimum value 1. No maximum.
# max_mccabe = 20
# Put packages (especially subclasses) in separate files.
[Modules::ProhibitMultiplePackages]
# set_themes = bugs core
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Write `require Module' instead of `require 'Module.pm''.
[Modules::RequireBarewordIncludes]
# set_themes = core portability
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# End each module with an explicitly `1;' instead of some funky expression.
[Modules::RequireEndWithOne]
# set_themes = bugs core pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Always make the `package' explicit.
[Modules::RequireExplicitPackage]
# set_themes = bugs core
# add_themes =
# severity = 4
# maximum_violations_per_document = 1
# Don't require programs to contain a package statement.
# exempt_scripts = 1
# Allow the specified modules to be imported outside a package.
allow_import_of = strict warnings
# Package declaration must match filename.
[Modules::RequireFilenameMatchesPackage]
# set_themes = bugs core
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# `use English' must be passed a `-no_match_vars' argument.
[Modules::RequireNoMatchVarsWithUseEnglish]
# set_themes = core performance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Give every module a `$VERSION' number.
[Modules::RequireVersionVar]
# set_themes = core pbp readability
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Distinguish different program components by case.
[NamingConventions::Capitalization]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# How package name components should be capitalized. Valid values are :single_case, :all_lower, :all_upper:, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# packages = :starts_with_upper
# Package names that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# package_exemptions = main
# How subroutine names should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# subroutines = :single_case
# Subroutine names that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# subroutine_exemptions = AUTOLOAD BUILD BUILDARGS CLEAR CLOSE DELETE DEMOLISH DESTROY EXISTS EXTEND FETCH FETCHSIZE FIRSTKEY GETC NEXTKEY POP PRINT PRINTF PUSH READ READLINE SCALAR SHIFT SPLICE STORE STORESIZE TIEARRAY TIEHANDLE TIEHASH TIESCALAR UNSHIFT UNTIE WRITE
# How local lexical variables names should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# local_lexical_variables = :single_case
# Local lexical variable names that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# local_lexical_variable_exemptions =
# How lexical variables that are scoped to a subset of subroutines, should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# scoped_lexical_variables = :single_case
# Names for variables in anonymous blocks that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# scoped_lexical_variable_exemptions =
# How lexical variables at the file level should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# file_lexical_variables = :single_case
# File-scope lexical variable names that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# file_lexical_variable_exemptions =
# How global (package) variables should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# global_variables = :single_case
# Global variable names that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# global_variable_exemptions = \$VERSION @ISA @EXPORT(?:_OK)? %EXPORT_TAGS \$AUTOLOAD %ENV %SIG \$TODO
# How constant names should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# constants = :all_upper
# Constant names that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# constant_exemptions =
# How labels should be capitalized. Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
# labels = :all_upper
# Labels that are exempt from capitalization rules. The values here are regexes that will be surrounded by \A and \z.
# label_exemptions =
# Don't use vague variable or subroutine names like 'last' or 'record'.
[NamingConventions::ProhibitAmbiguousNames]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The variable names that are not to be allowed.
# forbid = abstract bases close contract last left no record right second set
# Prohibit indirect object call syntax.
[Objects::ProhibitIndirectSyntax]
# set_themes = core maintenance pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Indirect method syntax is forbidden for these methods.
# Values that are always included: new.
# forbid =
# Write `@{ $array_ref }' instead of `@$array_ref'.
[References::ProhibitDoubleSigils]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Capture variable used outside conditional.
[RegularExpressions::ProhibitCaptureWithoutTest]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Names of ways to generate exceptions.
# Values that are always included: confess, croak, die.
# exception_source =
# Split long regexps into smaller `qr//' chunks.
[RegularExpressions::ProhibitComplexRegexes]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum number of characters to allow in a regular expression.
# Minimum value 1. No maximum.
# max_characters = 60
# Use named character classes instead of explicit character lists.
[RegularExpressions::ProhibitEnumeratedClasses]
# set_themes = core cosmetic pbp unicode
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Use character classes for literal meta-characters instead of escapes.
[RegularExpressions::ProhibitEscapedMetacharacters]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Use `eq' or hash instead of fixed-pattern regexps.
[RegularExpressions::ProhibitFixedStringMatches]
# set_themes = core pbp performance
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Use `[abc]' instead of `a|b|c'.
[RegularExpressions::ProhibitSingleCharAlternation]
# set_themes = core pbp performance
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# Only use a capturing group if you plan to use the captured value.
[RegularExpressions::ProhibitUnusedCapture]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Use only `//' or `{}' to delimit regexps.
[RegularExpressions::ProhibitUnusualDelimiters]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# In addition to allowing '{}', allow '()', '[]', and '{}'.
# allow_all_brackets =
# Use `{' and `}' to delimit multi-line regexps.
[RegularExpressions::RequireBracesForMultiline]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
# In addition to allowing '{}', allow '()', '[]', and '{}'.
# allow_all_brackets =
# Always use the `/s' modifier with regular expressions.
[-RegularExpressions::RequireDotMatchAnything]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Always use the `/x' modifier with regular expressions.
[RegularExpressions::RequireExtendedFormatting]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The number of characters that a regular expression must contain before this policy will complain.
# Minimum value 0. No maximum.
minimum_regex_length_to_complain_about = 40
# Should regexes that only contain whitespace and word characters be complained about?.
# strict = 0
# Always use the `/m' modifier with regular expressions.
[-RegularExpressions::RequireLineBoundaryMatching]
# set_themes = core cosmetic pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Don't call functions with a leading ampersand sigil.
[Subroutines::ProhibitAmpersandSigils]
# set_themes = core maintenance pbp
# add_themes =
# severity = 2
# maximum_violations_per_document = no_limit
# Don't declare your own `open' function.
[Subroutines::ProhibitBuiltinHomonyms]
# set_themes = bugs core pbp
# add_themes =
# severity = 4
# maximum_violations_per_document = no_limit
# Minimize complexity by factoring code into smaller subroutines.
[Subroutines::ProhibitExcessComplexity]
# set_themes = complexity core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum complexity score allowed.
# Minimum value 1. No maximum.
# max_mccabe = 20
# Return failure with bare `return' instead of `return undef'.
[Subroutines::ProhibitExplicitReturnUndef]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Too many arguments.
[Subroutines::ProhibitManyArgs]
# set_themes = core maintenance pbp
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# The maximum number of arguments to allow a subroutine to have.
# Minimum value 1. No maximum.
# max_arguments = 5
# `sub never { sub correct {} }'.
[Subroutines::ProhibitNestedSubs]
# set_themes = bugs core
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Behavior of `sort' is not defined if called in scalar context.
[Subroutines::ProhibitReturnSort]
# set_themes = bugs core
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Don't write `sub my_function (@@) {}'.
[Subroutines::ProhibitSubroutinePrototypes]
# set_themes = bugs core pbp
# add_themes =
# severity = 5
# maximum_violations_per_document = no_limit
# Prevent unused private subroutines.
[Subroutines::ProhibitUnusedPrivateSubroutines]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Pattern that determines what a private subroutine is.
# private_name_regex = \b_\w+\b
# Subroutines matching the private name regex to allow under this policy.
# allow =
# Prevent access to private subs in other packages.
[Subroutines::ProtectPrivateSubs]
# set_themes = core maintenance
# add_themes =
# severity = 3
# maximum_violations_per_document = no_limit
# Pattern that determines what a private subroutine is.
# private_name_regex = \b_\w+\b
# Subroutines matching the private name regex to allow under this policy.
# Values that are always included: POSIX::_PC_CHOWN_RESTRICTED, POSIX::_PC_LINK_MAX, POSIX::_PC_MAX_CANON, POSIX::_PC_MAX_INPUT, POSIX::_PC_NAME_MAX, POSIX::_PC_NO_TRUNC, POSIX::_PC_PATH_MAX, POSIX::_PC_PIPE_BUF, POSIX::_PC_VDISABLE, POSIX::_POSIX_ARG_MAX, POSIX::_POSIX_CHILD_MAX, POSIX::_POSIX_CHOWN_RESTRICTED, POSIX::_POSIX_JOB_CONTROL, POSIX::_POSIX_LINK_MAX, POSIX::_POSIX_MAX_CANON, POSIX::_POSIX_MAX_INPUT, POSIX::_POSIX_NAME_MAX, POSIX::_POSIX_NGROUPS_MAX, POSIX::_POSIX_NO_TRUNC, POSIX::_POSIX_OPEN_MAX, POSIX::_POSIX_PATH_MAX, POSIX::_POSIX_PIPE_BUF, POSIX::_POSIX_SAVED_IDS, POSIX::_POSIX_SSIZE_MAX, POSIX::_POSIX_STREAM_MAX, POSIX::_POSIX_TZNAME_MAX, POSIX::_POSIX_VDISABLE, POSIX::_POSIX_VERSION, POSIX::_SC_ARG_MAX, POSIX::_SC_CHILD_MAX, POSIX::_SC_CLK_TCK, POSIX::_SC_JOB_CONTROL, POSIX::_SC_NGROUPS_MAX, POSIX::_SC_OPEN_MAX, POSIX::_SC_PAGESIZE, POSIX::_SC_SAVED_IDS, POSIX::_SC_STREAM_MAX, POSIX::_SC_TZNAME_MAX, POSIX::_SC_VERSION, POSIX::_exit.
# allow =
# Always unpack `@_' first.