]> eyrie.org Git - kerberos/krb5-strength.git/blob - tests/data/perlcriticrc
Declare fast forward from 3.1-2
[kerberos/krb5-strength.git] / tests / data / perlcriticrc
1 # -*- conf -*-
2 #
3 # Default configuration for perlcritic.  Be sure to copy this into the source
4 # for packages that run perlcritic tests automatically during the build for
5 # reproducible test results.
6 #
7 # This file has been updated to match perlcritic 1.134.
8 #
9 # The canonical version of this file is maintained in the rra-c-util package,
10 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
11 #
12 # Written by Russ Allbery <eagle@eyrie.org>
13 # Copyright 2018-2019 Russ Allbery <eagle@eyrie.org>
14 # Copyright 2011-2013
15 #     The Board of Trustees of the Leland Stanford Junior University
16 #
17 # Permission is hereby granted, free of charge, to any person obtaining a
18 # copy of this software and associated documentation files (the "Software"),
19 # to deal in the Software without restriction, including without limitation
20 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
21 # and/or sell copies of the Software, and to permit persons to whom the
22 # Software is furnished to do so, subject to the following conditions:
23 #
24 # The above copyright notice and this permission notice shall be included in
25 # all copies or substantial portions of the Software.
26 #
27 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
30 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
32 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
33 # DEALINGS IN THE SOFTWARE.
34 #
35 # SPDX-License-Identifier: MIT
36
37 severity = 1
38 verbose  = %f:%l:%c: [%p] %m (%e, Severity: %s)\n
39
40 # I prefer this policy (a lot, actually), but other people in my group at
41 # Stanford really didn't like it, so this is my compromise to agree with a
42 # group coding style.
43 [-CodeLayout::ProhibitParensWithBuiltins]
44
45 # Stanford's coding style allows postfix unless for flow control.  There
46 # doesn't appear to be any way to allow it only for flow control (the logic
47 # for "if" and "when" appears to be special-cased), so we have to allow unless
48 # globally.
49 [ControlStructures::ProhibitPostfixControls]
50 allow = unless
51
52 # This is handled with a separate test case that uses Test::Spelling.
53 [-Documentation::PodSpelling]
54
55 # The POD sections Perl::Critic wants are incompatible with the POD template
56 # from perlpodstyle, which is what I use for my POD documentation.
57 [-Documentation::RequirePodSections]
58
59 # This problem was fixed in Perl 5.14, which now properly preserves the value
60 # of $@ even if destructors run at exit from the eval block.
61 [-ErrorHandling::RequireCheckingReturnValueOfEval]
62
63 # The default of 9 is too small and forces weird code contortions.
64 [InputOutput::RequireBriefOpen]
65 lines = 25
66
67 # This is correct 80% of the time, but it isn't correct for a lot of scripts
68 # inside packages, where maintaining $VERSION isn't worth the effort.
69 # Unfortunately, there's no way to override it, so it gets turned off
70 # globally.
71 [-Modules::RequireVersionVar]
72
73 # This sounds interesting but is actually useless.  Any large blocks of
74 # literal text, which does not add to the complexity of the regex, will set it
75 # off.
76 [-RegularExpressions::ProhibitComplexRegexes]
77
78 # Produces false positives currently with postfix dereferencing (introduced in
79 # Perl 5.20).  See https://github.com/Perl-Critic/Perl-Critic/issues/578.
80 [-References::ProhibitDoubleSigils]
81
82 # I generally don't want to require Readonly as a prerequisite for all my Perl
83 # modules.
84 [-ValuesAndExpressions::ProhibitConstantPragma]
85
86 # A good idea, but there are too many places where this would be more
87 # confusing than helpful.  Pull out numbers if one might change them
88 # independent of the algorithm, but don't do so for mathematical formulae.
89 [-ValuesAndExpressions::ProhibitMagicNumbers]
90
91 # Increase this to six digits so that I'm not told to add underscores to
92 # port numbers (which is just silly).
93 [ValuesAndExpressions::RequireNumberSeparators]
94 min_value = 100000
95
96 # IO::Uncompress::Gunzip puts the error message in a package variable.
97 # Text::Wrap has a broken interface that requires use of package variables.
98 [Variables::ProhibitPackageVars]
99 add_packages = IO::Uncompress::Gunzip Text::Wrap
100
101 # use English was one of the worst ideas in the history of Perl.  It makes the
102 # code slightly more readable for amateurs at the cost of confusing
103 # experienced Perl programmers and sending people in futile quests for where
104 # these magical global variables are defined.
105 [-Variables::ProhibitPunctuationVars]