Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b2328f7

Browse files
author
DKravtsov
committed
Updated composer dependencies. Added xalan tool for generating phpcpd html report.
1 parent e4e74e5 commit b2328f7

File tree

19 files changed

+2915
-976
lines changed

19 files changed

+2915
-976
lines changed

‎.idea/htdocs.iml

Lines changed: 0 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/php.xml

Lines changed: 2223 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
4242
sudo \
4343
libzip-dev \
4444
debsecan \
45+
xalan \
4546
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
4647
&& docker-php-ext-configure intl \
4748
&& docker-php-ext-install \

‎Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,19 @@ else
311311
endif
312312

313313
phpcpd: ## Runs php copy/paste detector
314-
@make exec cmd="php ./vendor/bin/phpcpd --fuzzy --verbose app tests"
314+
@make exec-bash cmd="mkdir -p reports/phpcpd && php ./vendor/bin/phpcpd --fuzzy --verbose --log-pmd=reports/phpcpd/phpcpd-report-v1.xml app tests"
315+
316+
phpcpd-html-report: ## Generates phpcpd html report
317+
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)
318+
@if [ ! -f reports/phpcpd/phpcpd-report-v1.xml ] ; then \
319+
printf "033円[32;49mreports/phpcpd/phpcpd-report-v1.xml not found, please run phpcpd.033円[39m\n" ; \
320+
else \
321+
printf "033円[32;49mCreating reports/phpcpd/phpcpd-report-v1.html report...033円[39m\n" ; \
322+
xalan -in reports/phpcpd/phpcpd-report-v1.xml -xsl https://systemsdk.github.io/phpcpd/report/phpcpd-html-v1_0_0.xslt -out reports/phpcpd/phpcpd-report-v1.html ; \
323+
fi;
324+
else
325+
@make exec-bash cmd="make phpcpd-html-report"
326+
endif
315327

316328
phpmd: ## Runs php mess detector
317329
@make exec cmd="php ./vendor/bin/phpmd app,tests text phpmd_ruleset.xml --suffixes php"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /