Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.5] Updated static analysis tooling #2694

Merged
merged 1 commit into from Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/static.yml
Expand Up @@ -10,13 +10,13 @@ jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: PHPStan
uses: docker://oskarstark/phpstan-ga
uses: OskarStark/phpstan-ga@0.12.28
env:
REQUIRE_DEV: true
with:
Expand All @@ -28,9 +28,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
uses: OskarStark/php-cs-fixer-ga@2.16.3.1
with:
args: --dry-run --diff-format udiff
19 changes: 19 additions & 0 deletions Makefile
Expand Up @@ -10,6 +10,11 @@ help:
@echo " docs-show to view the Sphinx docs"
@echo " tag to modify the version, update changelog, and chag tag"
@echo " package to build the phar and zip files"
@echo " static to run phpstan and php-cs-fixer on the codebase"
@echo " static-phpstan to run phpstan on the codebase"
@echo " static-phpstan-update-baseline to regenerate the phpstan baseline file"
@echo " static-codestyle-fix to run php-cs-fixer on the codebase, writing the changes"
@echo " static-codestyle-check to run php-cs-fixer on the codebase"

start-server: stop-server
node tests/server.js &> /dev/null &
Expand Down Expand Up @@ -56,4 +61,18 @@ tag:
package:
php build/packager.php

static: static-phpstan static-codestyle-check

static-phpstan:
docker run --rm -it -e REQUIRE_DEV=true -v ${PWD}:/app -w /app oskarstark/phpstan-ga:0.12.28 analyze $(PHPSTAN_PARAMS)

static-phpstan-update-baseline:
$(MAKE) static-phpstan PHPSTAN_PARAMS="--generate-baseline"

static-codestyle-fix:
docker run --rm -it -v ${PWD}:/app -w /app oskarstark/php-cs-fixer-ga:2.16.3.1 --diff-format udiff $(CS_PARAMS)

static-codestyle-check:
$(MAKE) static-codestyle-fix CS_PARAMS="--dry-run"

.PHONY: docs burgomaster coverage-show view-coverage
20 changes: 0 additions & 20 deletions phpstan-baseline.neon
Expand Up @@ -165,11 +165,6 @@ parameters:
count: 1
path: src/Cookie/CookieJar.php

-
message: "#^Method GuzzleHttp\\\\Cookie\\\\CookieJar\\:\\:count\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Cookie/CookieJar.php

-
message: "#^Method GuzzleHttp\\\\Cookie\\\\CookieJar\\:\\:getIterator\\(\\) return type has no value type specified in iterable type Traversable\\<mixed, mixed\\>\\.$#"
count: 1
Expand Down Expand Up @@ -320,21 +315,11 @@ parameters:
count: 1
path: src/Exception/BadResponseException.php

-
message: "#^Method GuzzleHttp\\\\Exception\\\\BadResponseException\\:\\:__construct\\(\\) has parameter \\$message with no typehint specified\\.$#"
count: 1
path: src/Exception/BadResponseException.php

-
message: "#^Method GuzzleHttp\\\\Exception\\\\ConnectException\\:\\:__construct\\(\\) has parameter \\$handlerContext with no value type specified in iterable type array\\.$#"
count: 1
path: src/Exception/ConnectException.php

-
message: "#^Method GuzzleHttp\\\\Exception\\\\ConnectException\\:\\:__construct\\(\\) has parameter \\$message with no typehint specified\\.$#"
count: 1
path: src/Exception/ConnectException.php

-
message: "#^Property GuzzleHttp\\\\Exception\\\\RequestException\\:\\:\\$handlerContext type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -345,11 +330,6 @@ parameters:
count: 1
path: src/Exception/RequestException.php

-
message: "#^Method GuzzleHttp\\\\Exception\\\\RequestException\\:\\:__construct\\(\\) has parameter \\$message with no typehint specified\\.$#"
count: 1
path: src/Exception/RequestException.php

-
message: "#^Method GuzzleHttp\\\\Exception\\\\RequestException\\:\\:create\\(\\) has parameter \\$ctx with no value type specified in iterable type array\\.$#"
count: 1
Expand Down