-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move deps * cleanup dockerfile * git vendor-bin * move vendor-bin to tools * fix tools naming for the makefile * add phpunit as separate tools config * fix injection * cs-fix * cleanup composer and docker * dont use classmap for developement * add shipmonk/composer-dependency-analyser as bin dep * streamline makefile
- Loading branch information
1 parent
4acf794
commit 4707e55
Showing
83 changed files
with
12,789 additions
and
3,976 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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
vendor/* | ||
tools/**/vendor/* | ||
tools/**/bin/* | ||
coverage/* | ||
tools/ | ||
.box_dump/ | ||
/deptrac.phar | ||
/deptrac.phar.asc | ||
|
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 |
---|---|---|
@@ -1,68 +1,57 @@ | ||
BOX_BIN := build/box.phar | ||
COMPOSER_BIN := composer | ||
COMPOSER_DEPENDENCY_ANALYSER_BIN := ./vendor/bin/composer-dependency-analyser | ||
PHP_BIN := php | ||
PHP_CS_FIXER_BIN := ./vendor/bin/php-cs-fixer | ||
PHPSTAN_BIN := ./vendor/bin/phpstan | ||
PSALM_BIN := ./vendor/bin/psalm | ||
PHPUNIT_BIN := ./vendor/bin/phpunit | ||
INFECTION_BIN := ./vendor/bin/roave-infection-static-analysis-plugin | ||
|
||
.PHONY: help | ||
|
||
COMPOSER_DEPENDENCY_ANALYSER_BIN := ./tools/dependency-analyser/bin/composer-dependency-analyser | ||
PHP_CS_FIXER_BIN := ./tools/php-cs-fixer/bin/php-cs-fixer | ||
PHPSTAN_BIN := ./tools/phpstan/bin/phpstan | ||
PSALM_BIN := ./tools/psalm/bin/psalm | ||
PHPUNIT_BIN := ./tools/phpunit/bin/phpunit | ||
INFECTION_BIN := ./tools/infection/bin/roave-infection-static-analysis-plugin | ||
|
||
.PHONY: help build tests deptrac gpg | ||
help: ## Displays list of available targets with their descriptions | ||
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
|
||
.PHONY: build | ||
build: tests ## Runs tests and creates the phar-binary | ||
$(BOX_BIN) compile | ||
|
||
.PHONY: composer-install | ||
composer-install: ## Installs dependencies | ||
$(COMPOSER_BIN) install --no-interaction --no-progress -a --ansi | ||
install: vendor ## Installs dependencies | ||
vendor: composer.json composer.lock | ||
$(COMPOSER_BIN) install --no-interaction --no-progress --ansi | ||
|
||
.PHONY: composer-dependency-analyser | ||
composer-dependency-analyser: ## Performs static code analysis using composer-dependency-analyser | ||
$(COMPOSER_DEPENDENCY_ANALYSER_BIN) | ||
|
||
.PHONY: deptrac | ||
deptrac: ## Analyses own architecture using the default config confile | ||
deptrac: vendor ## Analyses own architecture using the default config confile | ||
bin/deptrac analyse -c deptrac.config.php --cache-file=./.cache/deptrac.cache --no-progress --ansi | ||
|
||
#generate-changelog: ## Generates a changelog file based on changes compared to remote origin | ||
# gem install github_changelog_generator | ||
# github_changelog_generator -u qossmic -p deptrac --no-issues --future-release <version> | ||
|
||
.PHONY: gpg | ||
gpg: ## Signs release with local key | ||
gpg --detach-sign --armor --local-user ${USER} --output deptrac.phar.asc deptrac.phar | ||
gpg --verify deptrac.phar.asc deptrac.phar | ||
|
||
.PHONY: infection | ||
infection: composer-install ## Runs mutation tests | ||
infection: vendor ## Runs mutation tests | ||
$(INFECTION_BIN) --threads=$(shell nproc || sysctl -n hw.ncpu || 1) --test-framework-options='--testsuite=Tests' --only-covered --min-msi=85 --psalm-config=psalm.xml | ||
|
||
.PHONY: php-cs-check | ||
php-cs-check: ## Checks for code style violation | ||
php-cs-check: vendor ## Checks for code style violation | ||
$(PHP_CS_FIXER_BIN) fix --allow-risky=yes --diff --using-cache=no --verbose --dry-run | ||
|
||
.PHONY: php-cs-fix | ||
php-cs-fix: ## Fixes any found code style violation | ||
cs: vendor ## Fixes any found code style violation | ||
$(PHP_CS_FIXER_BIN) fix --allow-risky=yes | ||
|
||
.PHONY: phpstan | ||
phpstan: ## Performs static code analysis using phpstan | ||
$(PHPSTAN_BIN) analyse --memory-limit=256M | ||
phpstan: vendor ## Performs static code analysis using phpstan | ||
$(PHPSTAN_BIN) analyse | ||
|
||
.PHONY: psalm | ||
psalm: ## Performs static code analysis using psalm | ||
psalm: vendor ## Performs static code analysis using psalm | ||
$(PSALM_BIN) | ||
|
||
.PHONY: tests-coverage | ||
tests-coverage: composer-install ## Runs tests and generate an html coverage report | ||
tests-coverage: vendor ## Runs tests and generate an html coverage report | ||
XDEBUG_MODE=coverage $(PHPUNIT_BIN) -c . --coverage-html coverage | ||
|
||
.PHONY: tests | ||
tests: composer-install ## Runs tests followed by a very basic e2e-test | ||
tests: vendor ## Runs tests followed by a very basic e2e-test | ||
$(PHPUNIT_BIN) -c . | ||
bin/deptrac analyse --config-file=docs/examples/Fixture.depfile.yaml --no-cache |
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
Oops, something went wrong.