Skip to content

Commit

Permalink
Move php_codesnifffer into its own test-accceptance-style makefile ta…
Browse files Browse the repository at this point in the history
…rget
  • Loading branch information
phil-davis committed Mar 4, 2019
1 parent 8721ca7 commit ea2aa1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 12 additions & 0 deletions build/rules/test-acceptance.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ acceptance_test_deps=vendor-bin/behat/vendor

# bin file definitions
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
PHP_CODESNIFFER=vendor-bin/php_codesniffer/vendor/bin/phpcs

.PHONY: test-acceptance-api
test-acceptance-api: ## Run API acceptance tests
Expand All @@ -25,6 +26,11 @@ test-acceptance-webui: ## Run webUI acceptance tests
test-acceptance-webui: $(acceptance_test_deps)
BEHAT_BIN=$(BEHAT_BIN) ../../tests/acceptance/run.sh --remote --type webui

.PHONY: test-acceptance-style
test-acceptance-style: ## Run php_codesniffer and check acceptance test code-style
test-acceptance-style: vendor-bin/php_codesniffer/vendor
$(PHP_CODESNIFFER) --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance

#
# Dependency management
#--------------------------------------
Expand All @@ -36,3 +42,9 @@ vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/com

vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
@echo behat composer.lock is not up to date.

vendor-bin/php_codesniffer/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/php_codesniffer/composer.lock
composer bin php_codesniffer install --no-progress

vendor-bin/php_codesniffer/composer.lock: vendor-bin/php_codesniffer/composer.json
@echo php_codesniffer composer.lock is not up to date.
10 changes: 1 addition & 9 deletions build/rules/test-php.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include $(RELATIVE_PATH)check-composer.mk
PHPUNIT=php -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
PHPUNITDBG=phpdbg -qrr -d memory_limit=4096M -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer
PHP_CODESNIFFER=vendor-bin/php_codesniffer/vendor/bin/phpcs
PHAN=php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan
PHPSTAN=php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan

Expand All @@ -25,9 +24,8 @@ test-php-unit-dbg:

.PHONY: test-php-style
test-php-style: ## Run php-cs-fixer and check owncloud code-style
test-php-style: vendor-bin/owncloud-codestyle/vendor vendor-bin/php_codesniffer/vendor
test-php-style: vendor-bin/owncloud-codestyle/vendor
$(PHP_CS_FIXER) fix -v --diff --diff-format udiff --allow-risky yes --dry-run
$(PHP_CODESNIFFER) --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance

.PHONY: test-php-style-fix
test-php-style-fix: ## Run php-cs-fixer and fix code style issues
Expand Down Expand Up @@ -56,12 +54,6 @@ vendor-bin/owncloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-
vendor-bin/owncloud-codestyle/composer.lock: vendor-bin/owncloud-codestyle/composer.json
@echo owncloud-codestyle composer.lock is not up to date.

vendor-bin/php_codesniffer/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/php_codesniffer/composer.lock
composer bin php_codesniffer install --no-progress

vendor-bin/php_codesniffer/composer.lock: vendor-bin/php_codesniffer/composer.json
@echo php_codesniffer composer.lock is not up to date.

vendor-bin/phan/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/phan/composer.lock
composer bin phan install --no-progress

Expand Down

0 comments on commit ea2aa1a

Please sign in to comment.