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
|
##############################################################################
# This file is an example of a Perl::Critic configuration file. This
# file is usually called ".perlcriticrc" and is usually located in
# your home directory or the working directory of your project.
# However, you can use the -profile option to tell Perl::Critic use a
# different file in another location.
#
# The area before any of the [Perl::Critic::Policy] sections is used
# to set default values for the arguments to the Perl::Critic engine.
# If you are using the "perlcritic" program, you can override these
# settings at the command-line. Or if you are using the Perl::Critic
# library, your API arguments will override these settings as well.
#-----------------------------------------------------------------------------
# exclude: Directs Perl::Critic to never apply Policies with names that
# match one of the patterns. To specify multiple patterns, separate them
# with whitespace. Do not put quotes around anything.
exclude = Documentation Naming
#-----------------------------------------------------------------------------
# include: Directs Perl::Critic to always apply Policies with names that
# match one of the patterns. To specify multiple patterns, separate them
# with whitespace. Do not put quotes around anything.
include = CodeLayout Modules
#-----------------------------------------------------------------------------
# force: Directs Perl::Critic to ignore the special "##no critic"
# comments embedded in the source code. The default is 0. If
# defined, this should be either 1 or 0.
force = 1
#-----------------------------------------------------------------------------
# only: Directs Perl::Critic to only choose from Policies that are
# explicitly mentioned in this file. Otherwise, Perl::Critic chooses
# from all the Perl::Critic::Policy classes that are found on the
# local machine. The default is 0. If defined, this should be either
# 1 or 0.
only = 1
#-----------------------------------------------------------------------------
# severity: Sets the default minimum severity level for Policies. The
# default is 5. If defined, this should be an integer from 1 to 5,
# where 5 is the highest severity.
severity = 3
#-----------------------------------------------------------------------------
# theme: Sets the default theme. Only Policies that fit into this
# them shall be applied. If defined, this should be a valid theme
# expression. See the Perl::Critic POD for more details about this.
theme = danger + risky - pbp
#-----------------------------------------------------------------------------
# top: Directs Perl::Critic to only report the top N Policy violations,
# as ranked by their individual severity. If defined, this should be
# a positive integer.
top = 50
#-----------------------------------------------------------------------------
# verbose: Sets the format for printing Policy violations. If
# defined, this should be either a format spcecification, or a numeric
# verbosity level. See the Perl::Critic POD for more details.
verbose = 5
#-----------------------------------------------------------------------------
# color-severity-highest: sets the color used for displaying highest
# severity violations when coloring is in effect. This should be a color
# specification acceptable to Term::ANSIColor. See the Perl::Critic POD
# for details. Do not put quotes around the values. The default is 'bold
# red'.
color-severity-highest = bold red underline
#-----------------------------------------------------------------------------
# color-severity-high: sets the color used for displaying high severity
# violations when coloring is in effect. This should be a color
# specification acceptable to Term::ANSIColor. See the Perl::Critic POD
# for details. Do not put quotes around the values. The default is
# 'magenta'.
color-severity-high = bold magenta
#-----------------------------------------------------------------------------
# color-severity-medium: sets the color used for displaying medium
# severity violations when coloring is in effect. This should be a color
# specification acceptable to Term::ANSIColor. See the Perl::Critic POD
# for details. Do not put quotes around the values. The default is ''.
color-severity-medium = blue
#-----------------------------------------------------------------------------
# color-severity-low: sets the color used for displaying low severity
# violations when coloring is in effect. This should be a color
# specification acceptable to Term::ANSIColor. See the Perl::Critic POD
# for details. Do not put quotes around the values. The default is ''.
color-severity-low =
#-----------------------------------------------------------------------------
# color-severity-lowest: sets the color used for displaying lowest
# severity violations when coloring is in effect. This should be a color
# specification acceptable to Term::ANSIColor. See the Perl::Critic POD
# for details. Do not put quotes around the values. The default is ''.
color-severity-lowest =
#-----------------------------------------------------------------------------
# program-extensions: specifies the file name endings for files that should
# be interpreted as programs rather than modules. This should be a space-
# delimited list of the name endings, with leading '.' if that is desired.
# These are case-sensitive. See the Perl::Critic POD for details, but in
# general any file beginning with a shebang line, any file whose name ends
# '.PL', and any file whose name ends in one of the values specified here
# will be considered a program; any other file will be considered a module.
# Do not put quotes around the values. The default is ''.
program-extensions =
##############################################################################
# The rest of the file consists of several named blocks that contain
# configuration parameters for each of the Policies. The names of
# each blocks correspond to the names of the Policy modules. For
# brevity, the "Perl::Critic::Policy" portion of the name can be
# omitted. See the POD for the appropriate Policy for a complete
# description of the configuration parameters that it supports.
#-----------------------------------------------------------------------------
# If you vehmently disagree with a particular Policy, putting a "-" in
# front of the Policy name will effectively disables that Policy. It
# will never be applied unless you use the "-include" option to apply
# it explicitly.
[-NamingConventions::Capitalization]
[-TestingAndDebugging::RequireUseWarnings]
#-----------------------------------------------------------------------------
# If you agree with a Policy, but feel that it's severity level is not
# appropriate, then you can change the severity for any Policy. If
# defined this should be an integer from 1 to 5, where 5 is the
# highest severity.
[BuiltinFunctions::RequireBlockGrep]
severity = 2
[CodeLayout::ProhibitHardTabs]
severity = 1
[ClassHierarchies::ProhibitAutoloading]
severity = 5
#-----------------------------------------------------------------------------
# Policies are also organized into themes. Themes are just names for
# arbitrary groups of Policies. You can define new themes and add
# them to any Policy. If defined, this should be a string of
# whitespace-delimited words.
[RegularExpressions::RequireExtendedFormatting]
add_themes = client_foo
severity = 3
[RegularExpressions::RequireExtendedFormatting]
add_themes = client_foo client_bar
severity = 3
#-----------------------------------------------------------------------------
# Some Policies also have specialized configuration parameters. In
# all cases, these are repsented as simple name=value pairs. See the
# POD for the appropriate Policy for a complete discussion of its
# configuration parameters.
[ControlStructures::ProhibitPostfixControls]
allow = for if
severity = 4
[Documentation::RequirePodSections]
lib_sections = NAME | SYNOPSIS | METHODS | AUTHOR
add_themes = my_favorites
severity = 4
#-----------------------------------------------------------------------------
# If you set the "only" flag, then Perl::Critic only chooses from
# Policies that are mentioned in your configuration file. This is
# helpful when you want to use only a very small subset of the
# Policies. So just create blocks for any other Policies that you
# want to use.
[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
[ValuesAndExpressions::ProhibitLeadingZeros]
[InputOutput::ProhibitBarewordFileHandles]
[InputOutput::ProhibitBarewordDirHandles]
[Miscellanea::ProhibitTies]
|