From 21ce7d9ec02b0bf7c6e0ac7c28bc7c1bb0a841c5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Apr 2017 20:57:36 +0300 Subject: update phpmd ruleset to use (subset) of cleancode fix various minor issues reported by static analysis remove redundant php closing tag from several more files --- utils/gitlab-ci/phpmd-ruleset.xml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils') diff --git a/utils/gitlab-ci/phpmd-ruleset.xml b/utils/gitlab-ci/phpmd-ruleset.xml index 510eed152..fce9cee77 100644 --- a/utils/gitlab-ci/phpmd-ruleset.xml +++ b/utils/gitlab-ci/phpmd-ruleset.xml @@ -9,6 +9,11 @@ + + + + + -- cgit v1.2.3 From 42b37a0f9088158c5d985a735b26c5f8ff6e1721 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Apr 2017 21:07:02 +0300 Subject: phpmd: disable cleancode for the time being --- utils/gitlab-ci/phpmd-ruleset.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/gitlab-ci/phpmd-ruleset.xml b/utils/gitlab-ci/phpmd-ruleset.xml index fce9cee77..d2c010fbc 100644 --- a/utils/gitlab-ci/phpmd-ruleset.xml +++ b/utils/gitlab-ci/phpmd-ruleset.xml @@ -9,10 +9,10 @@ - + -- cgit v1.2.3 From 87267ce355188422c783f6b8e58c5f8850984985 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Apr 2017 21:15:23 +0300 Subject: ci scripts: exit properly on failure --- utils/gitlab-ci/php-lint.sh | 4 +++- utils/gitlab-ci/phpmd.sh | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/gitlab-ci/php-lint.sh b/utils/gitlab-ci/php-lint.sh index 172abd873..9bd513f88 100644 --- a/utils/gitlab-ci/php-lint.sh +++ b/utils/gitlab-ci/php-lint.sh @@ -1,3 +1,5 @@ -#!/bin/sh -e +#!/bin/sh + +set -e exec find . -name "*.php" -not -path "*/lib/*" -print0 | xargs -0 -n1 php -l diff --git a/utils/gitlab-ci/phpmd.sh b/utils/gitlab-ci/phpmd.sh index 117be1848..4ff5daf76 100644 --- a/utils/gitlab-ci/phpmd.sh +++ b/utils/gitlab-ci/phpmd.sh @@ -1,7 +1,8 @@ -#!/bin/sh -i -e +#!/bin/sh + +set -e phpmd include,classes text utils/gitlab-ci/phpmd-ruleset.xml FILES=$(ls -dm *.php | tr -d " "| tr -d "\n") phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml - -- cgit v1.2.3 From c2744831cd319fb967a83dc643bdb8b25f6c0b02 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Apr 2017 21:15:43 +0300 Subject: phpmd ci: add plugins --- utils/gitlab-ci/phpmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/gitlab-ci/phpmd.sh b/utils/gitlab-ci/phpmd.sh index 4ff5daf76..7541db840 100644 --- a/utils/gitlab-ci/phpmd.sh +++ b/utils/gitlab-ci/phpmd.sh @@ -2,7 +2,7 @@ set -e -phpmd include,classes text utils/gitlab-ci/phpmd-ruleset.xml +phpmd include,classes,plugins text utils/gitlab-ci/phpmd-ruleset.xml FILES=$(ls -dm *.php | tr -d " "| tr -d "\n") phpmd $FILES text utils/gitlab-ci/phpmd-ruleset.xml -- cgit v1.2.3