Skip to content

Commit

Permalink
Update tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Feb 16, 2023
1 parent 97689ab commit 5560a6e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 22 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ _: list
# Config

PHPCS_CONFIG=tools/phpcs.xml
PHPSTAN_SRC_CONFIG=tools/phpstan.src.neon
PHPSTAN_TESTS_CONFIG=tools/phpstan.tests.neon
PHPSTAN_CONFIG=tools/phpstan.neon
PHPSTAN_BASELINE_CONFIG=tools/phpstan.baseline.neon
PHPUNIT_CONFIG=tools/phpunit.xml
INFECTION_CONFIG=tools/infection.json

Expand All @@ -23,8 +23,10 @@ csf: ## Fix PHP files coding style

phpstan: ## Analyse code with PHPStan
mkdir -p var/tools
$(PRE_PHP) "vendor/bin/phpstan" analyse src -c $(PHPSTAN_SRC_CONFIG) $(ARGS)
$(PRE_PHP) "vendor/bin/phpstan" analyse tests -c $(PHPSTAN_TESTS_CONFIG) $(ARGS)
$(PRE_PHP) "vendor/bin/phpstan" analyse src tests -c $(PHPSTAN_CONFIG) $(ARGS)

phpstan-baseline: ## Add PHPStan errors to baseline
make phpstan ARGS="-b $(PHPSTAN_BASELINE_CONFIG)"

# Tests

Expand Down Expand Up @@ -68,4 +70,4 @@ PRE_PHP=XDEBUG_MODE=off
PHPUNIT_COMMAND="vendor/bin/paratest" -c $(PHPUNIT_CONFIG) --runner=WrapperRunner -p$(LOGICAL_CORES)
PHPUNIT_COVERAGE=php -d pcov.enabled=1 -d pcov.directory=./src $(PHPUNIT_COMMAND)

LOGICAL_CORES=$(shell nproc || sysctl -n hw.logicalcpu || echo 4)
LOGICAL_CORES=$(shell nproc || sysctl -n hw.logicalcpu || wmic cpu get NumberOfLogicalProcessors || echo 4)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</p>

<p align="center">
<a href="https://github.com/orisai/nette-predis/actions?query=workflow%3Aci">
<img src="https://github.com/orisai/nette-predis/workflows/ci/badge.svg">
<a href="https://github.com/orisai/nette-predis/actions?query=workflow%3ACI">
<img src="https://github.com/orisai/nette-predis/workflows/CI/badge.svg">
</a>
<a href="https://coveralls.io/r/orisai/nette-predis">
<img src="https://badgen.net/coveralls/c/github/orisai/nette-predis/v1.x?cache=300">
Expand Down
Empty file added tools/phpstan.baseline.neon
Empty file.
3 changes: 3 additions & 0 deletions tools/phpstan.base.neon → tools/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
includes:
- ../vendor/phpstan/phpstan/conf/bleedingEdge.neon
- phpstan.baseline.neon

parameters:
phpVersion: 70400
level: 8
tmpDir: ../var/tools/PHPStan
resultCachePath: %currentWorkingDirectory%/var/tools/PHPStan/resultCache.php

checkBenevolentUnionTypes: true
checkMissingCallableSignature: true
Expand Down
6 changes: 0 additions & 6 deletions tools/phpstan.src.neon

This file was deleted.

9 changes: 0 additions & 9 deletions tools/phpstan.tests.neon

This file was deleted.

0 comments on commit 5560a6e

Please sign in to comment.