Add inspections

This commit is contained in:
Dennis Eichhorn 2019-03-19 21:17:53 +01:00
parent 32692638e0
commit 2377cfe479
6 changed files with 30 additions and 10 deletions

View File

@ -32,8 +32,8 @@ CODE[22]="onblur"
for i in "${CODE[@]}"
do
grep -rlni "$i" --include \*.js ${ROOT_PATH}/jsOMS >> ${INSPECTION_PATH}/Framework/critical_js.log
grep -rlni "$i" --include \*.js ${ROOT_PATH}/Modules >> ${INSPECTION_PATH}/Modules/citical_js.log
grep -rlni "$i" --include \*.js ${ROOT_PATH}/Web >> ${INSPECTION_PATH}/Web/citical_js.log
grep -rlni "$i" --include \*.js ${ROOT_PATH}/Modules >> ${INSPECTION_PATH}/Modules/critical_js.log
grep -rlni "$i" --include \*.js ${ROOT_PATH}/Web >> ${INSPECTION_PATH}/Web/critical_js.log
done
# JS strict type

View File

@ -7,6 +7,9 @@ echo "Start php linting inspection"
find ${ROOT_PATH}/phpOMS -name "*.php" | xargs -L1 php -l > ${INSPECTION_PATH}/logs/temp.log
sed '/^No syntax.*/ d' < ${INSPECTION_PATH}/logs/temp.log > ${INSPECTION_PATH}/Framework/linting/linting_php.log
find ${ROOT_PATH}/Web -name "*.php" | xargs -L1 php -l > ${INSPECTION_PATH}/logs/temp.log
sed '/^No syntax.*/ d' < ${INSPECTION_PATH}/logs/temp.log > ${INSPECTION_PATH}/Framework/linting/linting_php.log
find ${ROOT_PATH}/Modules -name "*.php" | xargs -L1 php -l > ${INSPECTION_PATH}/logs/temp.log
sed '/^No syntax.*/ d' < ${INSPECTION_PATH}/logs/temp.log > ${INSPECTION_PATH}/Modules/linting/linting_php.log

View File

@ -44,13 +44,13 @@ touch ${INSPECTION_PATH}/Web/critical_php.log
for i in "${CODE[@]}"
do
grep -rlni "$i" --include \*.php ${ROOT_PATH}/phpOMS >> ${INSPECTION_PATH}/Framework/critical_php.log
grep -rlni "$i" --include \*.php ${ROOT_PATH}/Modules >> ${INSPECTION_PATH}/Modules/citical_php.log
grep -rlni "$i" --include \*.php ${ROOT_PATH}/Model >> ${INSPECTION_PATH}/Model/citical_php.log
grep -rlni "$i" --include \*.php ${ROOT_PATH}/Web >> ${INSPECTION_PATH}/Web/citical_php.log
grep -rlni "$i" --include \*.php ${ROOT_PATH}/Modules >> ${INSPECTION_PATH}/Modules/critical_php.log
grep -rlni "$i" --include \*.php ${ROOT_PATH}/Model >> ${INSPECTION_PATH}/Model/critical_php.log
grep -rlni "$i" --include \*.php ${ROOT_PATH}/Web >> ${INSPECTION_PATH}/Web/critical_php.log
done
# PHP strict type
grep -r -L "declare\(\ *strict_types\ *=\ *1\ *\);" --include=*.php ${ROOT_PATH}/phpOMS > ${INSPECTION_PATH}/Framework/strict_missing_php.log
grep -r -L "declare\(\ *strict_types\ *=\ *1\ *\);" --include=*.php ${ROOT_PATH}/Modules > ${INSPECTION_PATH}/Modules/strict_missing_php.log
grep -r -L "declare\(\ *strict_types\ *=\ *1\ *\);" --include=*.php ${ROOT_PATH}/Model > ${INSPECTION_PATH}/Model/strict_missing_php.log
grep -r -L "declare\(\ *strict_types\ *=\ *1\ *\);" --include=*.php ${ROOT_PATH}/Web > ${INSPECTION_PATH}/Web/strict_missing_php.log
grep -r -L "declare\(strict_types=1\);" --include=*.php ${ROOT_PATH}/phpOMS > ${INSPECTION_PATH}/Framework/strict_missing_php.log
grep -r -L "declare\(strict_types=1\);" --include=*.php ${ROOT_PATH}/Modules > ${INSPECTION_PATH}/Modules/strict_missing_php.log
grep -r -L "declare\(strict_types=1\);" --include=*.php ${ROOT_PATH}/Model > ${INSPECTION_PATH}/Model/strict_missing_php.log
grep -r -L "declare\(strict_types=1\);" --include=*.php ${ROOT_PATH}/Web > ${INSPECTION_PATH}/Web/strict_missing_php.log

View File

@ -4,11 +4,16 @@
echo "Start php stats inspection"
#
php ${TOOLS_PATH}/phploc.phar ${ROOT_PATH}/phpOMS/ > ${INSPECTION_PATH}/Framework/phploc.log
php ${TOOLS_PATH}/phploc.phar ${ROOT_PATH}/Web/ > ${INSPECTION_PATH}/Web/phploc.log
php ${TOOLS_PATH}/phploc.phar ${ROOT_PATH}/Modules/ > ${INSPECTION_PATH}/Modules/phploc.log
#
php ${TOOLS_PATH}/phpmetrics.phar --report-html=${INSPECTION_PATH}/Framework/metrics/metrics.html ${ROOT_PATH}/phpOMS/ >> ${INSPECTION_PATH}/Framework/build.log
php ${TOOLS_PATH}/phpmetrics.phar --report-html=${INSPECTION_PATH}/Modules/metrics/metrics.html ${ROOT_PATH}/Modules/ >> ${INSPECTION_PATH}/Modules/build.log
#
php ${TOOLS_PATH}/pdepend.phar --summary-xml=${INSPECTION_PATH}/Framework/pdepend/pdepend.xml --jdepend-chart=${INSPECTION_PATH}/Framework/pdepend/chart.svg --overview-pyramid=${INSPECTION_PATH}/Framework/pdepend/pyramid.svg ${ROOT_PATH}/phpOMS
php ${TOOLS_PATH}/pdepend.phar --summary-xml=${INSPECTION_PATH}/Modules/pdepend/pdepend.xml --jdepend-chart=${INSPECTION_PATH}/Modules/pdepend/chart.svg --overview-pyramid=${INSPECTION_PATH}/Modules/pdepend/pyramid.svg ${ROOT_PATH}/Modules

View File

@ -5,5 +5,9 @@
echo "Start php style inspection"
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=${INSPECTION_PATH}/Framework/phpcs.log
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/phpOMS --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=${INSPECTION_PATH}/Modules/phpcs.log
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/Web --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=${INSPECTION_PATH}/Modules/phpcs.log
php ${TOOLS_PATH}/phpcs.phar ${ROOT_PATH}/Modules --standard="${BUILD_PATH}/Config/phpcs.xml" -s --report=full --report-file=${INSPECTION_PATH}/Modules/phpcs.log
#php ${TOOLS_PATH}/phpmd.phar ${ROOT_PATH}/phpOMS text ${BUILD_PATH}/Config/phpmd.xml --exclude *tests* --minimumpriority 1

View File

@ -70,6 +70,14 @@ mkdir -p ${INSPECTION_PATH}/Modules/phpcpd
mkdir -p ${INSPECTION_PATH}/Modules/linting
mkdir -p ${INSPECTION_PATH}/Modules/html
mkdir -p ${INSPECTION_PATH}/Web/logs
mkdir -p ${INSPECTION_PATH}/Web/metrics
mkdir -p ${INSPECTION_PATH}/Web/pdepend
mkdir -p ${INSPECTION_PATH}/Web/phpcs
mkdir -p ${INSPECTION_PATH}/Web/phpcpd
mkdir -p ${INSPECTION_PATH}/Web/linting
mkdir -p ${INSPECTION_PATH}/Web/html
mkdir -p ${INSPECTION_PATH}/Framework
mkdir -p ${INSPECTION_PATH}/Web
mkdir -p ${INSPECTION_PATH}/Model