1 # perlcritic configuration file
3 # Copyright (C) 2012 Simon Ruderich
5 # This file is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this file. If not, see <http://www.gnu.org/licenses/>.
19 # Be strict about errors in ~/.perlcriticrc.
20 profile-strictness = fatal
22 # Display all errors/warnings by default.
29 # IMHO 'x' is more readable than q{x}, so ignore this warning.
30 [-ValuesAndExpressions::ProhibitNoisyQuotes]
31 # Same for '', ignore it too.
32 [-ValuesAndExpressions::ProhibitEmptyQuotes]
34 # I know how /s, /x and /m work (and expect that from others), ignore these
36 [-RegularExpressions::RequireDotMatchAnything]
37 [-RegularExpressions::RequireExtendedFormatting]
38 [-RegularExpressions::RequireLineBoundaryMatching]
40 # I prefer exact line numbers in errors, allow die instead of croak. I don't
41 # develop perl modules so it shouldn't be a problem.
42 [-ErrorHandling::RequireCarping]
44 # IMHO "print $FH ..." is readable enough, "print {$FH} ..." is not necessary.
45 [-InputOutput::RequireBracedFileHandleWithPrint]
47 # Don't require checks for print's return value. I check the return value of
48 # other functions like open() or close(), but checking every print is just a
50 [InputOutput::RequireCheckedSyscalls]
52 exclude_functions = print
54 # IMHO punctuation variables are more readable than their English counterparts
55 # (and faster in some cases). So allow the ones I use often.
56 [Variables::ProhibitPunctuationVars]
57 allow = $0 $! $? $. $@ $/ $" $+ $-
59 # Allow the usage of ".." when '..' occurs inside the string, e.g. in strings
61 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
62 allow_if_string_contains_single_quote = 1