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 # color-severity-highest: sets the color used for displaying highest
75 # severity violations when coloring is in effect. This should be a color
76 # specification acceptable to Term::ANSIColor. See the Perl::Critic POD
77 # for details. Do not put quotes around the values. The default is 'bold
80 color-severity-highest = bold red underline
82 #-----------------------------------------------------------------------------
83 # color-severity-high: sets the color used for displaying high severity
84 # violations when coloring is in effect. This should be a color
85 # specification acceptable to Term::ANSIColor. See the Perl::Critic POD
86 # for details. Do not put quotes around the values. The default is
89 color-severity-high = bold magenta
91 #-----------------------------------------------------------------------------
92 # color-severity-medium: sets the color used for displaying medium
93 # severity violations when coloring is in effect. This should be a color
94 # specification acceptable to Term::ANSIColor. See the Perl::Critic POD
95 # for details. Do not put quotes around the values. The default is ''.
97 color-severity-medium = blue
99 #-----------------------------------------------------------------------------
100 # color-severity-low: sets the color used for displaying low severity
101 # violations when coloring is in effect. This should be a color
102 # specification acceptable to Term::ANSIColor. See the Perl::Critic POD
103 # for details. Do not put quotes around the values. The default is ''.
107 #-----------------------------------------------------------------------------
108 # color-severity-lowest: sets the color used for displaying lowest
109 # severity violations when coloring is in effect. This should be a color
110 # specification acceptable to Term::ANSIColor. See the Perl::Critic POD
111 # for details. Do not put quotes around the values. The default is ''.
113 color-severity-lowest =
115 #-----------------------------------------------------------------------------
116 # program-extensions: specifies the file name endings for files that should
117 # be interpreted as programs rather than modules. This should be a space-
118 # delimited list of the name endings, with leading '.' if that is desired.
119 # These are case-sensitive. See the Perl::Critic POD for details, but in
120 # general any file beginning with a shebang line, any file whose name ends
121 # '.PL', and any file whose name ends in one of the values specified here
122 # will be considered a program; any other file will be considered a module.
123 # Do not put quotes around the values. The default is ''.
127 ##############################################################################
128 # The rest of the file consists of several named blocks that contain
129 # configuration parameters for each of the Policies. The names of
130 # each blocks correspond to the names of the Policy modules. For
131 # brevity, the "Perl::Critic::Policy" portion of the name can be
132 # omitted. See the POD for the appropriate Policy for a complete
133 # description of the configuration parameters that it supports.
136 #-----------------------------------------------------------------------------
137 # If you vehmently disagree with a particular Policy, putting a "-" in
138 # front of the Policy name will effectively disables that Policy. It
139 # will never be applied unless you use the "-include" option to apply
142 [-NamingConventions::Capitalization]
143 [-TestingAndDebugging::RequireUseWarnings]
145 #-----------------------------------------------------------------------------
146 # If you agree with a Policy, but feel that it's severity level is not
147 # appropriate, then you can change the severity for any Policy. If
148 # defined this should be an integer from 1 to 5, where 5 is the
151 [BuiltinFunctions::RequireBlockGrep]
154 [CodeLayout::ProhibitHardTabs]
157 [ClassHierarchies::ProhibitAutoloading]
160 #-----------------------------------------------------------------------------
161 # Policies are also organized into themes. Themes are just names for
162 # arbitrary groups of Policies. You can define new themes and add
163 # them to any Policy. If defined, this should be a string of
164 # whitespace-delimited words.
166 [RegularExpressions::RequireExtendedFormatting]
167 add_themes = client_foo
170 [RegularExpressions::RequireExtendedFormatting]
171 add_themes = client_foo client_bar
174 #-----------------------------------------------------------------------------
175 # Some Policies also have specialized configuration parameters. In
176 # all cases, these are repsented as simple name=value pairs. See the
177 # POD for the appropriate Policy for a complete discussion of its
178 # configuration parameters.
180 [ControlStructures::ProhibitPostfixControls]
184 [Documentation::RequirePodSections]
185 lib_sections = NAME | SYNOPSIS | METHODS | AUTHOR
186 add_themes = my_favorites
189 #-----------------------------------------------------------------------------
190 # If you set the "only" flag, then Perl::Critic only chooses from
191 # Policies that are mentioned in your configuration file. This is
192 # helpful when you want to use only a very small subset of the
193 # Policies. So just create blocks for any other Policies that you
196 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
197 [ValuesAndExpressions::ProhibitLeadingZeros]
198 [InputOutput::ProhibitBarewordFileHandles]
199 [Miscellanea::ProhibitTies]