]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - misc/perl/perlcriticrc
Move to misc/ in preparation for merge into new dotfiles repository
[config/dotfiles.git] / misc / perl / perlcriticrc
diff --git a/misc/perl/perlcriticrc b/misc/perl/perlcriticrc
new file mode 100644 (file)
index 0000000..6fb1f06
--- /dev/null
@@ -0,0 +1,62 @@
+# perlcritic configuration file
+
+# Copyright (C) 2012  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# Be strict about errors in ~/.perlcriticrc.
+profile-strictness = fatal
+
+# Display all errors/warnings by default.
+severity = brutal
+
+# Use colored output.
+color = 1
+
+
+# IMHO 'x' is more readable than q{x}, so ignore this warning.
+[-ValuesAndExpressions::ProhibitNoisyQuotes]
+# Same for '', ignore it too.
+[-ValuesAndExpressions::ProhibitEmptyQuotes]
+
+# I know how /s, /x and /m work (and expect that from others), ignore these
+# warnings.
+[-RegularExpressions::RequireDotMatchAnything]
+[-RegularExpressions::RequireExtendedFormatting]
+[-RegularExpressions::RequireLineBoundaryMatching]
+
+# I prefer exact line numbers in errors, allow die instead of croak. I don't
+# develop perl modules so it shouldn't be a problem.
+[-ErrorHandling::RequireCarping]
+
+# IMHO "print $FH ..." is readable enough, "print {$FH} ..." is not necessary.
+[-InputOutput::RequireBracedFileHandleWithPrint]
+
+# Don't require checks for print's return value. I check the return value of
+# other functions like open() or close(), but checking every print is just a
+# waste of time.
+[InputOutput::RequireCheckedSyscalls]
+functions = :builtins
+exclude_functions = print
+
+# IMHO punctuation variables are more readable than their English counterparts
+# (and faster in some cases). So allow the ones I use often.
+[Variables::ProhibitPunctuationVars]
+allow = $0 $! $? $. $@ $/ $" $+ $-
+
+# Allow the usage of ".." when '..' occurs inside the string, e.g. in strings
+# like ".. '..' ..".
+[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
+allow_if_string_contains_single_quote = 1