git-remote-mediawiki: add a .perlcriticrc file
Such a file allows to configure perlcritic. Here, it is used to remove many unwanted rules and configure one to remove unwanted warnings. Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Célestin Matte committed
Jun 14, 2013 at 15:50 UTC
b5cda5b3132a56e87caad5d8a541f09733f1ed33
1 file changed
+28
contrib/mw-to-git/.perlcriticrc
new
+28
@@ -0,0 +1,28 @@
1
+# These 3 rules demand to add the s, m and x flag to *every* regexp. This is
2
+# overkill and would be harmful for readability.
3
+[-RegularExpressions::RequireExtendedFormatting]
4
+[-RegularExpressions::RequireDotMatchAnything]
5
+[-RegularExpressions::RequireLineBoundaryMatching]
6
+
7
+# This rule says that builtin functions should not be called with parentheses
8
+# e.g.: (taken from CPAN's documentation)
9
+# open($handle, '>', $filename); #not ok
10
+# open $handle, '>', $filename; #ok
11
+# Applying such a rule would mean modifying a huge number of lines for a
12
+# question of style.
13
+[-CodeLayout::ProhibitParensWithBuiltins]
14
+
15
+# This rule states that each system call should have its return value checked
16
+# The problem is that it includes the print call. Checking every print call's
17
+# return value would be harmful to the code readabilty.
18
+# This configuration keeps all default function but print.
19
+[InputOutput::RequireCheckedSyscalls]
20
+functions = open say close
21
+
22
+# This rules demands to add a dependancy for the Readonly module. This is not
23
+# wished.
24
+[-ValuesAndExpressions::ProhibitConstantPragma]
25
+
26
+# This rule is not really useful (rather a question of style) and produces many
27
+# warnings among the code.
28
+[-ValuesAndExpressions::ProhibitNoisyQuotes]