forked from vimeo/psalm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into phpstorm-inspections
* upstream/master: (609 commits) Register so it doesn’t get removed Add support for compact Allow suppression of unused variable issues Fix tests Fix unused ref in assign op Issue 1926 unused variable (vimeo#1967) Fix ignoreExceptions tags (vimeo#1966) Improve DOM extension types (vimeo#1965) Fix infinite recursion on property types Analyse binary ops always Mark private properties unused when referenced only in constructor (vimeo#1962) Prefix constant Add slash Normalise plugin path Also convert \\ to / when scanning windows configs on macs Fix file path weirdness when scanning config files Reduce with / before converting back Improve behaviour of templated template assertions Break out templated assertion tests Restore gitignore for .*.swp in sub-directories (vimeo#1958) ... # Conflicts: # src/Psalm/Config.php # src/Psalm/Context.php # src/Psalm/Internal/Analyzer/ClassAnalyzer.php # src/Psalm/Internal/Analyzer/CommentAnalyzer.php # src/Psalm/Internal/Analyzer/FileAnalyzer.php # src/Psalm/Internal/Analyzer/FunctionAnalyzer.php # src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php # src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php # src/Psalm/Internal/Analyzer/MethodAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/Call/NewAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ConstFetchAnalyzer.php # src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php # src/Psalm/Internal/Analyzer/StatementsAnalyzer.php # src/Psalm/Internal/Analyzer/TypeAnalyzer.php # src/Psalm/Internal/Codebase/Analyzer.php # src/Psalm/Internal/Codebase/ClassLikes.php # src/Psalm/Internal/Codebase/Populator.php # src/Psalm/Internal/Codebase/Properties.php # src/Psalm/Internal/Codebase/Scanner.php # src/Psalm/Internal/LanguageServer/LanguageServer.php # src/Psalm/Internal/LanguageServer/Server/TextDocument.php # src/Psalm/Internal/Provider/FunctionExistenceProvider.php # src/Psalm/Internal/Provider/FunctionParamsProvider.php # src/Psalm/Internal/Provider/FunctionReturnTypeProvider.php # src/Psalm/Internal/Provider/MethodExistenceProvider.php # src/Psalm/Internal/Provider/MethodParamsProvider.php # src/Psalm/Internal/Provider/MethodReturnTypeProvider.php # src/Psalm/Internal/Provider/MethodVisibilityProvider.php # src/Psalm/Internal/Provider/PropertyExistenceProvider.php # src/Psalm/Internal/Provider/PropertyTypeProvider.php # src/Psalm/Internal/Provider/PropertyVisibilityProvider.php # src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php # src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayReduceReturnTypeProvider.php # src/Psalm/Internal/Type/ParseTree.php # src/Psalm/Internal/Type/TypeCombination.php # src/Psalm/Internal/Visitor/ReflectorVisitor.php # src/Psalm/Type.php # src/Psalm/Type/Atomic/TNamedObject.php # src/Psalm/Type/Reconciler.php # src/command_functions.php
- Loading branch information
Showing
484 changed files
with
30,462 additions
and
8,827 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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/ | ||
version: 2.1 | ||
executors: | ||
php-72: | ||
docker: | ||
- image: thecodingmachine/php:7.2-v2-cli | ||
jobs: | ||
install-and-self-analyse: | ||
executor: php-72 | ||
steps: | ||
- checkout | ||
- run: date "+%F" > /tmp/cachekey; cat composer.json >> /tmp/cachekey | ||
- restore_cache: | ||
keys: | ||
- composer-v2-{{ checksum "/tmp/cachekey" }} | ||
# fallback to using the latest cache if no exact match is found (See https://circleci.com/docs/2.0/caching/) | ||
- composer-v2- | ||
- run: composer update | ||
- save_cache: | ||
key: composer-v2-{{ checksum "/tmp/cachekey" }} | ||
paths: | ||
- vendor | ||
- run: | ||
name: Static analysis | ||
command: php -dextension=pcntl.so ./psalm --threads=10 | ||
- persist_to_workspace: | ||
root: /home/docker/project/ | ||
paths: | ||
- . | ||
"Code Style Analysis": | ||
executor: php-72 | ||
steps: | ||
- attach_workspace: | ||
at: /home/docker/project/ | ||
- run: | ||
name: Code Style Analysis with PHPCS | ||
command: vendor/bin/phpcs | ||
test: | ||
executor: php-72 | ||
steps: | ||
- attach_workspace: | ||
at: /home/docker/project/ | ||
- run: | ||
name: PHPUnit test | ||
command: php vendor/bin/phpunit --log-junit build/phpunit/phpunit.xml | ||
- store_test_results: | ||
path: build/ | ||
- store_artifacts: | ||
path: build/phpunit | ||
- persist_to_workspace: | ||
root: /home/docker/project/ | ||
paths: | ||
- . | ||
coverage: | ||
executor: php-72 | ||
steps: | ||
- attach_workspace: | ||
at: /home/docker/project/ | ||
- run: | ||
name: PHPUnit test with coverage | ||
command: php -dextension=pcov.so vendor/bin/phpunit --coverage-html build/phpunit/coverage-html | ||
- store_artifacts: | ||
path: build/phpunit/coverage-html | ||
- run: | ||
name: Display link to coverage report | ||
command: | | ||
echo "PHPUnit coverage report available at:" | ||
echo https://circleci.com/api/v1.1/project/github/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}/artifacts/0/home/docker/project/build/phpunit/coverage-html/index.html | ||
phar-build: | ||
executor: php-72 | ||
steps: | ||
- attach_workspace: | ||
at: /home/docker/project/ | ||
- run: | ||
name: Build Phar file | ||
command: bin/build-phar.sh | ||
- run: | ||
name: Smoke test Phar file | ||
command: build/psalm.phar --version | ||
- store_artifacts: | ||
path: build/psalm.phar | ||
- run: | ||
name: Display link to phar file | ||
command: | | ||
echo "Phar build available at:" | ||
echo https://circleci.com/api/v1.1/project/github/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}/artifacts/0/home/docker/project/build/psalm.phar | ||
- persist_to_workspace: | ||
root: /home/docker/project/ | ||
paths: | ||
- build/psalm.phar | ||
test-with-real-projects: | ||
executor: php-72 | ||
steps: | ||
- checkout # used here just for the side effect of loading the github public ssh key so we can clone other stuff | ||
- attach_workspace: | ||
at: /home/docker/project/ | ||
- run: | ||
name: Analyse PHPUnit | ||
command: bin/test-with-real-projects.sh | ||
- store_artifacts: | ||
path: build/psalm.phar | ||
|
||
# Orchestrate or schedule a set of jobs, see https://circleci.com/docs/2.0/workflows/ | ||
workflows: | ||
Welcome: | ||
jobs: | ||
- install-and-self-analyse | ||
- test: | ||
requires: | ||
- install-and-self-analyse | ||
- "Code Style Analysis": | ||
requires: | ||
- install-and-self-analyse | ||
- coverage: | ||
requires: | ||
- test | ||
- "Code Style Analysis" | ||
- phar-build: | ||
requires: | ||
- test | ||
- "Code Style Analysis" | ||
- test-with-real-projects: | ||
requires: | ||
- phar-build |
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,11 +1,17 @@ | ||
/build/ | ||
/vendor/ | ||
/extra/ | ||
.DS_Store | ||
/.php_cs.cache | ||
/.php_cs | ||
/.*.swp | ||
/.*.swo | ||
/.phpunit.result.cache | ||
.*.swp | ||
.*.swo | ||
/composer.lock | ||
/phpunit.xml | ||
/vendor-bin/*/composer.lock | ||
/vendor-bin/*/vendor/ | ||
/tests/fixtures/symlinktest/* | ||
|
||
.idea/inspectionProfiles/Project_Default.xml | ||
.idea/workspace.xml |
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
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
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
Oops, something went wrong.