OSDN Git Service

git-remote-mediawiki: add test and check Makefile targets
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Thu, 29 Aug 2013 18:58:21 +0000 (20:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Aug 2013 19:07:24 +0000 (12:07 -0700)
There are a few level 4 and 2 perlcritic issues in the current code. We
make level 5 fatal, and keep level 2 as warnings.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/mw-to-git/Makefile

index 76fcd4d..f206f96 100644 (file)
@@ -24,6 +24,11 @@ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
 
 all: build
 
+test: all
+       $(MAKE) -C t
+
+check: perlcritic test
+
 install_pm:
        install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
 
@@ -41,4 +46,7 @@ clean:
        rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
 
 perlcritic:
-       perlcritic -2 *.perl
+       perlcritic -5 $(SCRIPT_PERL)
+       -perlcritic -2 $(SCRIPT_PERL)
+
+.PHONY: all test check install_pm install clean perlcritic