1 ##############################################################################
2 # This file is an example of a Perl::Critic configuration file. This
3 # file is usually called ".perlcriticrc" and is usually located in
4 # your home directory or the working directory of your project.
5 # However, you can use the -profile option to tell Perl::Critic use a
6 # different file in another location.
8 # The area before any of the [Perl::Critic::Policy] sections is used
9 # to set default values for the arguments to the Perl::Critic engine.
10 # If you are using the "perlcritic" program, you can override these
11 # settings at the command-line. Or if you are using the Perl::Critic
12 # library, your API arguments will override these settings as well.
15 #-----------------------------------------------------------------------------
16 # exclude: Directs Perl::Critic to never apply Policies with names that
17 # match one of the patterns. To specify multiple patterns, separate them
18 # with whitespace. Do not put quotes around anything.
20 exclude = Documentation Naming
22 #-----------------------------------------------------------------------------
23 # include: Directs Perl::Critic to always apply Policies with names that
24 # match one of the patterns. To specify multiple patterns, separate them
25 # with whitespace. Do not put quotes around anything.
27 include = CodeLayout Modules
29 #-----------------------------------------------------------------------------
30 # force: Directs Perl::Critic to ignore the special "##no critic"
31 # comments embedded in the source code. The default is 0. If
32 # defined, this should be either 1 or 0.
36 #-----------------------------------------------------------------------------
37 # only: Directs Perl::Critic to only choose from Policies that are
38 # explicitly mentioned in this file. Otherwise, Perl::Critic chooses
39 # from all the Perl::Critic::Policy classes that are found on the
40 # local machine. The default is 0. If defined, this should be either
45 #-----------------------------------------------------------------------------
46 # severity: Sets the default minimum severity level for Policies. The
47 # default is 5. If defined, this should be an integer from 1 to 5,
48 # where 5 is the highest severity.
52 #-----------------------------------------------------------------------------
53 # theme: Sets the default theme. Only Policies that fit into this
54 # them shall be applied. If defined, this should be a valid theme
55 # expression. See the Perl::Critic POD for more details about this.
57 theme = danger + risky - pbp
59 #-----------------------------------------------------------------------------
60 # top: Directs Perl::Critic to only report the top N Policy violations,
61 # as ranked by their individual severity. If defined, this should be
66 #-----------------------------------------------------------------------------
67 # verbose: Sets the format for printing Policy violations. If
68 # defined, this should be either a format spcecification, or a numeric
69 # verbosity level. See the Perl::Critic POD for more details.
73 ##############################################################################
74 # The rest of the file consists of several named blocks that contain
75 # configuration parameters for each of the Policies. The names of
76 # each blocks correspond to the names of the Policy modules. For
77 # brevity, the "Perl::Critic::Policy" portion of the name can be
78 # omitted. See the POD for the appropriate Policy for a complete
79 # description of the configuration parameters that it supports.
82 #-----------------------------------------------------------------------------
83 # If you vehmently disagree with a particular Policy, putting a "-" in
84 # front of the Policy name will effectively disables that Policy. It
85 # will never be applied unless you use the "-include" option to apply
88 [-NamingConventions::ProhibitMixedCaseVars]
89 [-NamingConventions::ProhibitMixedCaseSubs]
90 [-TestingAndDebugging::RequireUseWarnings]
92 #-----------------------------------------------------------------------------
93 # If you agree with a Policy, but feel that it's severity level is not
94 # appropriate, then you can change the severity for any Policy. If
95 # defined this should be an integer from 1 to 5, where 5 is the
98 [BuiltinFunctions::RequireBlockGrep]
101 [CodeLayout::ProhibitHardTabs]
104 [ClassHierarchies::ProhibitAutoloading]
107 #-----------------------------------------------------------------------------
108 # Policies are also organized into themes. Themes are just names for
109 # arbitrary groups of Policies. You can define new themes and add
110 # them to any Policy. If defined, this should be a string of
111 # whitespace-delimited words.
113 [RegularExpressions::RequireExtendedFormatting]
114 add_themes = client_foo
117 [RegularExpressions::RequireExtendedFormatting]
118 add_themes = client_foo client_bar
121 #-----------------------------------------------------------------------------
122 # Some Policies also have specialized configuration parameters. In
123 # all cases, these are repsented as simple name=value pairs. See the
124 # POD for the appropriate Policy for a complete discussion of its
125 # configuration parameters.
127 [ControlStructures::ProhibitPostfixControls]
131 [Documentation::RequirePodSections]
132 lib_sections = NAME | SYNOPSIS | METHODS | AUTHOR
133 add_themes = my_favorites
136 #-----------------------------------------------------------------------------
137 # If you set the "only" flag, then Perl::Critic only chooses from
138 # Policies that are mentioned in your configuration file. This is
139 # helpful when you want to use only a very small subset of the
140 # Policies. So just create blocks for any other Policies that you
143 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
144 [ValuesAndExpressions::ProhibitLeadingZeros]
145 [InputOutput::ProhibitBarewordFileHandles]
146 [Miscellanea::ProhibitTies]