]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - misc/perl/perlcriticrc
Move to misc/ in preparation for merge into new dotfiles repository
[config/dotfiles.git] / misc / perl / perlcriticrc
1 # perlcritic configuration file
2
3 # Copyright (C) 2012  Simon Ruderich
4 #
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.
9 #
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.
14 #
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/>.
17
18
19 # Be strict about errors in ~/.perlcriticrc.
20 profile-strictness = fatal
21
22 # Display all errors/warnings by default.
23 severity = brutal
24
25 # Use colored output.
26 color = 1
27
28
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]
33
34 # I know how /s, /x and /m work (and expect that from others), ignore these
35 # warnings.
36 [-RegularExpressions::RequireDotMatchAnything]
37 [-RegularExpressions::RequireExtendedFormatting]
38 [-RegularExpressions::RequireLineBoundaryMatching]
39
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]
43
44 # IMHO "print $FH ..." is readable enough, "print {$FH} ..." is not necessary.
45 [-InputOutput::RequireBracedFileHandleWithPrint]
46
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
49 # waste of time.
50 [InputOutput::RequireCheckedSyscalls]
51 functions = :builtins
52 exclude_functions = print
53
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 $! $? $. $@ $/ $" $+ $-
58
59 # Allow the usage of ".." when '..' occurs inside the string, e.g. in strings
60 # like ".. '..' ..".
61 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
62 allow_if_string_contains_single_quote = 1