Skip to content

Commit b5cda5b

Browse files
Perdugitster
authored andcommitted
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 <[email protected]> Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d49a038 commit b5cda5b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

contrib/mw-to-git/.perlcriticrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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]

0 commit comments

Comments
 (0)