Implement docblocks generation

This commit is contained in:
Dennis Eichhorn 2018-01-06 18:19:27 +01:00
parent 5641ac9f78
commit f6fb2d2491
3 changed files with 10 additions and 6 deletions

View File

@ -6,8 +6,8 @@
grep -rln "=\"\"" --include \*.tpl.php ${ROOT_PATH} > ${INSPECTION_PATH}/Modules/html/attributes_empty.log
# Find invalid attributes
find ${ROOT_PATH} -name "*tpl.php" | xargs -0 grep '(id=")([\ ]*)(")' > ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs -0 grep '(min=")([a-zA-Z]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs -0 grep '(max=")([a-zA-Z]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs -0 grep '(=")([#$%^&*\(\)\\/]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs -0 grep '(<img(?!.*?alt=(["]).*?\2)[^>]*?)(/?>)' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(id=")([\ ]*)(")' > ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(min=")([a-zA-Z]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(max=")([a-zA-Z]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(=")([#$%^&*\(\)\\/]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(<img(?!.*?alt=(["]).*?\2)[^>]*?)(/?>)' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log

View File

@ -12,7 +12,7 @@ mysql -e 'create database oms;' -u ${DB_USER} -p${DB_PASSWORD}
#. Js/build.sh
# Executing unit tests
. Inspection/Php/tests.sh
php ${TOOLS_PATH}/phpunit.phar -v --configuration ${TEST_PATH}/PHPUnit/phpunit_default.xml --log-junit ${INSPECTION_PATH}/Test/Php/junit_php.xml --testdox-html ${INSPECTION_PATH}/Test/Php/index.html --coverage-html ${INSPECTION_PATH}/Test/Php/coverage --coverage-clover ${INSPECTION_PATH}/Test/Php/coverage.xml > ${INSPECTION_PATH}/Test/Php/phpunit.log
# Stats & metrics
. Inspection/Php/stats.sh
@ -27,3 +27,6 @@ mysql -e 'create database oms;' -u ${DB_USER} -p${DB_PASSWORD}
# Custom php inspections
. Inspection/Php/security.sh
# Documentation
php ${TOOLS_PATH}/documentor.phar -s ${ROOT_PATH}/phpOMS -d ${BASE_PATH}/docblock -c ${INSPECTION_PATH}/Test/Php/coverage.xml -u ${INSPECTION_PATH}/Test/Php/junit_php.xml -b http://orange-management.de/Inspection/Test/Php/docblock

View File

@ -74,6 +74,7 @@ if [ ! -d "$TOOLS_PATH" ]; then
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
wget -nc https://github.com/Orange-Management/Documentor/releases/download/1.1.0/documentor.phar
tar -zxvf compiler-latest.tar.gz
chmod -R 777 ${TOOLS_PATH}