1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

57 Commits

Author SHA1 Message Date
Matthew Brown
8202af957d Index issues by file to reduce some lookups 2020-01-21 21:07:44 -05:00
Brown
821f3528d2 Fix #701 - indicate issues fixable with Psalter 2019-12-02 15:24:01 -05:00
lhchavez
216f991b0c Normalize stringified type names (#2239)
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Matthew Brown
b5cbc84351 Fix #1617 - add option to only show errors in reports 2019-06-09 12:37:28 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
Brown
09a8d68288 Use more specific location for return type issues 2019-03-29 15:36:13 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Matthew Brown
c800fb9282 Fix #1437 - use correct return type line for error 2019-03-07 23:19:17 -05:00
Bruce Weirdan
ec85096c96 Fixed identified issues 2019-03-02 08:43:19 -05:00
Matthew Brown
947e3bf0f1 Fix crashes when analysing aliased class instances 2018-12-21 11:32:44 -05:00
Brown
110ca66692 Namespace test providers under Internal cc @TysonAndre 2018-11-12 11:20:59 -05:00
Matthew Brown
4d79b61e93 Change _checker to _analyzer 2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matthew Brown
92e11fd51b Port over cleanup from server branch 2018-10-06 20:11:19 -04:00
Brown
d0bd10d143 Improve provider architecture, upping test coverage 2018-09-30 11:34:51 -04:00
Matthew Brown
695ececc22 Add tests for 7c10a09 2018-08-08 22:44:02 -04:00
Matthew Brown
17b27b31e8 Fix erroneous input/output lines 2018-03-29 10:26:26 -04:00
Matthew Brown
956972b4a4 Fix #539 - evaluate global variable usage 2018-02-25 10:43:54 -05:00
Matt Brown
5471b89391 Make array coercion an error 2018-02-21 18:59:31 -05:00
Matthew Brown
a99e89495b Add end line/column data for LSP support 2018-02-19 18:16:09 -05:00
Matthew Brown
81fd016120 Fix #193 - allow caching of storages 2018-02-19 00:27:39 -05:00
Matthew Brown
108ca54867 Fix #516 - make sure --find-references-to doesn’t output missing references 2018-02-17 17:45:30 -05:00
Matthew Brown
8e0998e081 Break apart the Codebase class 2018-02-03 18:56:54 -05:00
Matt Brown
b0f3992f36 Remove stopOnFirstError config option, because it hasn’t worked for a while
Fixes #248
2018-01-24 16:22:54 -05:00
Matthew Brown
bc9761f6c9 Create Codebase out from ProjectChecker 2018-01-21 13:45:33 -05:00
Matthew Brown
9b6b03ff9f Create Config before ProjectChecker, and remove test-specific code from FileChecker 2018-01-21 10:22:04 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
cc81d78dfd Add code replacement api to allow Psalm to update arbitrary parts of the codebase
Fixes #264
2018-01-02 09:46:50 -05:00
Matthew Brown
81cfe09fae Improve reporting of classlike locations in docblocks 2018-01-01 20:04:03 -05:00
Matthew Brown
f81642c1eb Fix location of function param vars 2017-12-29 21:28:21 -05:00
Matt Brown
eca7351472 Add return-level issues as well as function-level ones
Fixes #379
2017-12-07 15:50:25 -05:00
Matthew Brown
0eedad4f6a Add UndefinedGlobalVariable issue and asssociated Possibly... one 2017-12-06 00:56:00 -05:00
Matthew Brown
657d154288 CacheProvider -> ParserCacheProvider 2017-10-15 11:57:44 -04:00
Matthew Brown
e29dd140e3 Refactor scanning and analysis, introducing multithreading (#191)
* Add failing test

* Add visitor to soup up classlike references

* Move a whole bunch of code into the visitor

* Move some methods back, move onto analysis stage

* Use the getAliases method everywhere

* Fix refs

* Fix more refs

* Fix some tests

* Fix more tests

* Fix include tests

* Shift config class finding to project checker and fix bugs

* Fix a few more tests

* transition test to new syntax

* Remove var_dump

* Delete a bunch of code and fix mutation test

* Remove unnecessary visitation

* Transition to better mocked out file provider, breaking some cached statement loading

* Use different scheme for naming anonymous classes

* Fix anonymous class issues

* Refactor file/statement loading

* Add specific property types

* Fix mapped property assignment

* Improve how we deal with traits

* Fix trait checking

* Pass Psalm checks

* Add multi-process support

* Delay console output until the end

* Remove PHP 7 syntax

* Update file storage with classes

* Fix scanning individual files and add reflection return types

* Always turn XDebug off

* Add quicker method of getting method mutations

* Queue return types for crawling

* Interpret all strings as possible classes once we see a `get_class` call

* Check invalid return types again

* Fix template namespacing issues

* Default to class-insensitive file names for includes

* Don’t overwrite existing issues data

* Add var docblocks for scanning

* Add null check

* Fix loading of external classes in templates

* Only try to populate class when we haven’t yet seen it’s not a class

* Fix trait property accessibility

* Only ever improve docblock param type

* Make param replacement more robust

* Fix static const missing inferred type

* Fix a few more tests

* Register constant definitions

* Fix trait aliasing

* Skip constant type tests for now

* Fix linting issues

* Make sure caching is off for tests

* Remove unnecessary return

* Use emulative parser if on PHP 5.6

* Cache parser for faster first-time parse

* Fix constant resolution when scanning classes

* Remove test that’s beyond a practical scope

* Add back --diff support

* Add --help for --threads

* Remove unused vars
2017-07-25 16:11:02 -04:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Jon Ursenbach
11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00
Matthew Brown
e687887ba3 Emit an InvalidReturnType when it should contain null, and introduct LessSpecificReturnType 2017-03-18 12:18:17 -04:00
Matthew Brown
e61ea17db5 Move FileChecker functionality into separate, better-contained classes 2017-02-18 13:41:27 -05:00
Matt Brown
a7872472be Add stubbing tests and modify config initialisation 2017-01-31 19:22:05 -05:00
Matthew Brown
7e7743d6fb Do not complain about missing void return types if config set 2017-01-25 17:07:28 -07:00
Matthew Brown
35062a7c5a Make sure we don’t take website down by mistake 2017-01-15 23:18:26 -05:00
Matt Brown
6e6106c080 Add docblocks to tests 2017-01-13 14:07:23 -05:00
Matthew Brown
17329015dc Discriminate between checking, visiting and analyzing in method names 2017-01-07 15:09:47 -05:00
Matthew Brown
7609ca02c0 Fix #32 by evaluating all class references in files lazily 2017-01-04 23:42:58 -05:00
Matthew Brown
e6a794c728 Improve code hilighting for single-line docblocks 2017-01-01 23:31:07 -05:00
Matthew Brown
23a414a2b3 Fix test failures 2016-12-30 13:14:17 -05:00
Matthew Brown
8b5e066ba6 Add case-sensitive function names 2016-12-30 13:09:00 -05:00
Matthew Brown
5f332a5500 Suppress test issue 2016-12-20 17:29:52 +00:00