From 4fd8a700bd5fa737e3c7bfb1165870a1f9fc3c77 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 31 Jan 2018 19:12:22 +0100 Subject: [PATCH] added codestyle draft --- Inspection/Php/style.sh | 6 ++++++ inspect.sh | 3 +++ setup.sh | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 Inspection/Php/style.sh diff --git a/Inspection/Php/style.sh b/Inspection/Php/style.sh new file mode 100644 index 0000000..0dbeee8 --- /dev/null +++ b/Inspection/Php/style.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +. config.sh + +php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --colors --standard="${BUILD_PATH}/phpcs.xml" -s --report=full +php ${TOOLS_PATH}/phpmd.phar ${ROOT_PATH}/phpOMS text ${BUILD_PATH}/phpmd.xml --exclude *tests* --minimumpriority 1 \ No newline at end of file diff --git a/inspect.sh b/inspect.sh index 670f8f2..daf469d 100644 --- a/inspect.sh +++ b/inspect.sh @@ -21,6 +21,9 @@ php ${TOOLS_PATH}/phpunit.phar -v --configuration ${ROOT_PATH}/tests/phpunit_def . Inspection/Php/linting.sh . Inspection/Json/linting.sh +# Code style +. Inspection/Php/style.sh + # Custom html inspections . Inspection/Html/tags.sh . Inspection/Html/attributes.sh diff --git a/setup.sh b/setup.sh index c73c547..8296ceb 100644 --- a/setup.sh +++ b/setup.sh @@ -71,6 +71,8 @@ if [ ! -d "$TOOLS_PATH" ]; then wget -nc https://getcomposer.org/composer.phar wget -nc https://phar.phpunit.de/phploc.phar wget -nc https://phar.phpunit.de/phpunit.phar + wget -nc https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.2.2/phpcs.phar + wget -nc http://static.phpmd.org/php/latest/phpmd.phar wget -nc https://github.com/Halleck45/PhpMetrics/raw/master/build/phpmetrics.phar wget -nc http://static.pdepend.org/php/latest/pdepend.phar wget -nc http://dl.google.com/closure-compiler/compiler-latest.tar.gz