Merge branch 'cm/remote-mediawiki-perlcritique'
* cm/remote-mediawiki-perlcritique: (31 commits) git-remote-mediawiki: make error message more precise git-remote-mediawiki: add a perlcritic rule in Makefile git-remote-mediawiki: add a .perlcriticrc file git-remote-mediawiki: clearly rewrite double dereference git-remote-mediawiki: fix a typo ("mediwiki" instead of "mediawiki") git-remote-mediawiki: put non-trivial numeric values in constants. git-remote-mediawiki: don't use quotes for empty strings git-remote-mediawiki: replace "unless" statements with negated "if" statements git-remote-mediawiki: brace file handles for print for more clarity git-remote-mediawiki: modify strings for a better coding-style git-remote-mediawiki: put long code into a subroutine git-remote-mediawiki: remove import of unused open2 git-remote-mediawiki: check return value of open git-remote-mediawiki: assign a variable as undef and make proper indentation git-remote-mediawiki: rename a variable ($last) which has the name of a keyword git-remote-mediawiki: remove unused variable $entry git-remote-mediawiki: turn double-negated expressions into simple expressions git-remote-mediawiki: change the name of a variable git-remote-mediawiki: add newline in the end of die() error messages git-remote-mediawiki: change style in a regexp ...
This commit is contained in:
commit
39abbd38d8
28
contrib/mw-to-git/.perlcriticrc
Normal file
28
contrib/mw-to-git/.perlcriticrc
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# These 3 rules demand to add the s, m and x flag to *every* regexp. This is
|
||||||
|
# overkill and would be harmful for readability.
|
||||||
|
[-RegularExpressions::RequireExtendedFormatting]
|
||||||
|
[-RegularExpressions::RequireDotMatchAnything]
|
||||||
|
[-RegularExpressions::RequireLineBoundaryMatching]
|
||||||
|
|
||||||
|
# This rule says that builtin functions should not be called with parentheses
|
||||||
|
# e.g.: (taken from CPAN's documentation)
|
||||||
|
# open($handle, '>', $filename); #not ok
|
||||||
|
# open $handle, '>', $filename; #ok
|
||||||
|
# Applying such a rule would mean modifying a huge number of lines for a
|
||||||
|
# question of style.
|
||||||
|
[-CodeLayout::ProhibitParensWithBuiltins]
|
||||||
|
|
||||||
|
# This rule states that each system call should have its return value checked
|
||||||
|
# The problem is that it includes the print call. Checking every print call's
|
||||||
|
# return value would be harmful to the code readabilty.
|
||||||
|
# This configuration keeps all default function but print.
|
||||||
|
[InputOutput::RequireCheckedSyscalls]
|
||||||
|
functions = open say close
|
||||||
|
|
||||||
|
# This rules demands to add a dependancy for the Readonly module. This is not
|
||||||
|
# wished.
|
||||||
|
[-ValuesAndExpressions::ProhibitConstantPragma]
|
||||||
|
|
||||||
|
# This rule is not really useful (rather a question of style) and produces many
|
||||||
|
# warnings among the code.
|
||||||
|
[-ValuesAndExpressions::ProhibitNoisyQuotes]
|
@ -15,3 +15,5 @@ all: build
|
|||||||
build install clean:
|
build install clean:
|
||||||
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
|
||||||
$@-perl-script
|
$@-perl-script
|
||||||
|
perlcritic:
|
||||||
|
perlcritic -2 *.perl
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user