-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,322 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ all: | |
|
||
.PHONY: test | ||
test: | ||
bin/phpunit | ||
bin/phpunit --prepend tests/phpunit-xdebug-coverage.php | ||
|
||
.PHONY: test-quick | ||
test-quick: | ||
|
@@ -111,14 +111,18 @@ push-travis: | |
#------------------------------------------------------------------------------- | ||
# Linting and Static Analysis | ||
|
||
.PHONY: lint | ||
lint: | ||
.PHONY: mkdir | ||
mkdir: | ||
@ mkdir -p reports | ||
|
||
.PHONY: phpcsfixer | ||
phpcsfixer: | ||
@ echo " " | ||
@ echo "=====> Running PHP CS Fixer..." | ||
- bin/php-cs-fixer fix -vvv | ||
|
||
.PHONY: phpcs | ||
phpcs: | ||
@ echo " " | ||
@ echo "=====> Running PHP Code Sniffer..." | ||
- bin/phpcs --report-xml=reports/phpcs-src.xml -p --colors --encoding=utf-8 $$(find src/ -type f -name "*.php" | sort | uniq) | ||
|
@@ -130,30 +134,54 @@ lint: | |
@ echo " " | ||
@ php tools/reporter.php | ||
|
||
.PHONY: analyze | ||
analyze: lint test | ||
.PHONY: lint | ||
lint: mkdir phpcsfixer phpcs | ||
|
||
.PHONY: xdebug | ||
xdebug: | ||
bin/phpunit --dump-xdebug-filter tests/phpunit-xdebug-coverage.php | ||
|
||
.PHONY: phpcpd | ||
phpcpd: | ||
@ echo " " | ||
@ echo "=====> Running PHP Copy-Paste Detector..." | ||
- bin/phpcpd --names=*.php --log-pmd=$$(pwd)/reports/copy-paste.xml --fuzzy src/ | ||
|
||
.PHONY: phploc | ||
phploc: | ||
@ echo " " | ||
@ echo "=====> Running PHP Lines-of-Code..." | ||
- bin/phploc --names=*.php --log-xml=$$(pwd)/reports/phploc-src.xml src/ > $$(pwd)/reports/phploc-src.txt | ||
- bin/phploc --names=*.php --log-xml=$$(pwd)/reports/phploc-tests.xml tests/ > $$(pwd)/reports/phploc-tests.txt | ||
|
||
.PHONY: phpca | ||
phpca: | ||
@ echo " " | ||
@ echo "=====> Running PHP Code Analyzer..." | ||
- php bin/phpca src/ --no-progress | tee reports/phpca-src.txt | ||
- php bin/phpca tests/ --no-progress | tee reports/phpca-tests.txt | ||
|
||
.PHONY: licenses | ||
licenses: | ||
@ echo " " | ||
@ echo "=====> Running Open-Source License Check..." | ||
- composer licenses | grep -v BSD-.-Clause | grep -v MIT | grep -v Apache-2.0 | tee reports/licenses.txt | ||
- composer licenses | grep -v BSD-.-Clause | grep -v MIT | grep -v Apache-2.0 | grep -v ISC | tee reports/licenses.txt | ||
|
||
.PHONY: vulns | ||
vulns: | ||
@ echo " " | ||
@ echo "=====> Comparing Composer dependencies against the PHP Security Advisories Database..." | ||
- curl -sSL -H "Accept: text/plain" https://security.symfony.com/check_lock -F [email protected] | tee reports/sensiolabs.txt | ||
|
||
.PHONY: psalm | ||
psalm: | ||
@ echo " " | ||
@ echo "=====> Running Psalm..." | ||
- bin/psalm --find-unused-code=always --generate-json-map=./reports/psalm.json --output-format=console --show-info=true --show-snippet=true --stats --threads=$$(nproc) --php-version=7.2 | ||
|
||
.PHONY: analyze | ||
analyze: lint test phpcpd phploc phpca licenses vulns | ||
|
||
#------------------------------------------------------------------------------- | ||
# Git Tasks | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.