1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 09:47:29 +01:00
Commit Graph

122 Commits

Author SHA1 Message Date
Matthew Brown
a0a9128375 Fix #285 - add PossiblyInvalidArrayAccess 2017-11-11 21:22:11 -05:00
Matthew Brown
126fd9a3a1 Fix #286 - ignore terrible param types 2017-11-11 11:28:49 -05:00
Matt Brown
59265ef2bf Fix #276 - fix false positive in magic call 2017-11-10 18:08:26 -05:00
Matthew Brown
765d82548d Remove more dead code 2017-11-08 23:27:51 -05:00
Matthew Brown
a651fad6f0 Fix #263 - add support for @psalm-param and @psalm-var annotations 2017-11-02 21:45:17 -04:00
Matthew Brown
e84586cfaa Fix return type space issue 2017-09-16 15:08:11 -04:00
Matthew Brown
7c261d7d1f Add return after every special type 2017-09-16 15:00:50 -04:00
Matthew Brown
9a3cb742cb Refactor docblock manipulation and add tests for it 2017-09-16 12:45:20 -04:00
Matt Brown
eee8442af6 Fix #199 - allow classes to suppress PropertyNotSetInConstructor warnings 2017-09-13 11:32:13 -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
e60f085741 Fix #178 - complain when encountering bad @return type 2017-07-09 20:32:35 -04:00
Matthew Brown
368b6670d7 Fix a few edgecases 2017-06-29 00:28:37 -04:00
Matthew Brown
fa4678912f Fix possible nullref 2017-05-29 23:21:46 -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
Matthew Brown
688a72c794 Fix #36 - emit issues on deprecated properties 2017-05-25 01:32:34 -04:00
Matthew Brown
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
42b435e23f Fix #134 - warn when docblock type is ill-formatted 2017-05-24 21:11:18 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matt Brown
39ece995b6 Add @psalm-ignore-nullable-return annotation 2017-05-10 12:36:11 -04:00
Matthew Brown
c9b9b29cf4 Fix all phpcs issues 2017-05-04 21:57:26 -04:00
Matt Brown
df890fbfb0 Fix #155 - support @property declaration for classes with magic getters & setters 2017-05-04 18:35:05 -04:00
Jon Ursenbach
f65c618b2e PSR-2 adjustments and adding PHPCS checks into the Travis config. (#149)
* PSR-2 adjustments and adding PHPCS checks into the Travis config.

* Reverting some CallChecker changes and no longer casting vars to null.
2017-04-28 00:31:55 -04:00
Matthew Brown
23401672c0 Fix issue parsing return types with brackets 2017-04-19 09:03:24 -04:00
SignpostMarv
46a0b03aac enable the exposure of the source line number when DocblockParseException is thrown 2017-04-11 22:14:15 +01:00
Matthew Brown
5cd1b6735f Add even more references in docblocks 2017-03-01 22:27:52 -05:00
Matthew Brown
f32fabd798 Remove dead code 2017-02-11 19:30:06 -05:00
Matthew Brown
8ffd45407c Add support for namespaced templates 2017-02-10 00:14:44 -05:00
Matthew Brown
98b0ed280c Add support for templating 2017-02-09 20:35:17 -05:00
Matthew Brown
01beb97413 Fix #87 - array types from docblocks can be reasoned about safely 2017-02-03 22:07:14 -05:00
Matthew Brown
1bf0882bfc Allow commas at the end of @param lines 2017-01-28 00:37:52 -07:00
Matthew Brown
c868781731 Fix multiline docblock issue reporting issue 2017-01-27 22:24:25 -07:00
Matthew Brown
bc668e2c7a Change variadic docblock param to match language syntax 2017-01-17 01:14:43 -05:00
Matthew Brown
317eab8730 Add support for ?A types in docblock 2017-01-16 19:17:46 -05:00
Matthew Brown
c78ce31e36 Be more lenient when type left out of docblock 2017-01-15 23:49:58 -05:00
Matthew Brown
d361f17203 Catch {int} types 2017-01-15 11:00:35 -05:00
Matthew Brown
03141e41c2 Move string-stored types into named classes 2017-01-15 10:22:05 -05:00
Matthew Brown
694da2cabd Simplify a lot of APIs 2017-01-07 14:35:07 -05:00
Matthew Brown
e6a794c728 Improve code hilighting for single-line docblocks 2017-01-01 23:31:07 -05:00
Matthew Brown
393297786d Fix issues with single-letter classes 2016-12-31 00:14:00 -05:00
Matthew Brown
b6eea4e812 Fix #20 - emit an issue when param is missing a type or param 2016-12-25 11:32:21 +00:00
Matthew Brown
c55870e26c Allow generic TypeChecker::isContainedBy checks 2016-12-24 18:28:43 +00:00
Matthew Brown
9746c8972f Fix MixedAssignment errors 2016-12-17 00:48:31 -05:00
Matt Brown
d012510a41 Fix some mixed assignment issues 2016-12-16 19:22:30 -05:00
Matt Brown
6755c8724a Add tests for M* issues, fixing bugs along the way 2016-12-16 18:56:23 -05:00
Matthew Brown
562f71b21f Add TypeDoesNotContainType issue and fix those issues in Psalm code 2016-12-11 13:48:11 -05:00
Matthew Brown
a1acbfec07 Show code snippets when reporting errors
This also introduces a new method of identifying specific code locations when creating issues
2016-12-03 19:11:30 -05:00
Matthew Brown
4f95c67e1c Emit issues for null/mixed array access 2016-11-21 19:07:56 -05:00
Matthew Brown
72071fb5ec Add missing docblock params 2016-11-21 13:37:27 -05:00
Matthew Brown
9d3dcc7401 Do not panic when bad types are passed 2016-11-20 23:31:10 -05:00
Matthew Brown
5cf95b42f2 --update-docblocks now works 2016-11-12 23:59:31 -05:00
Matthew Brown
264e77addd Change a few more words 2016-11-07 19:16:51 -05:00
Matthew Brown
36fc49965b Correct speling 2016-11-07 17:31:02 -05:00
Matthew Brown
622a0794c3 Swap in Fully-Qualified for Absolute terms 2016-11-07 17:29:51 -05:00
Jon Ursenbach
8a6e8e9940 Fixing remaining PSR-2 violations. 2016-11-03 20:51:56 -04:00
Jon Ursenbach
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00
Matthew Brown
88eb43e9ca Break out ExpressionChecker 2016-11-01 14:14:41 -04:00
Matthew Brown
a6850a8f3c Prevent a nullref 2016-11-01 01:02:54 -04:00
Matthew Brown
34af24a2b4 Add all the properties 2016-11-01 00:39:41 -04:00
Matthew Brown
b31ac4a862 Removed object-like type descriptor in favour of array{} syntax 2016-10-28 13:24:06 -04:00
Matthew Brown
c91cb30bd6 Rethrow exception 2016-10-28 11:05:51 -04:00
Matthew Brown
cc0c62fd23 Allow spaces in docblock types 2016-10-28 00:11:16 -04:00
Matthew Brown
a1acaa231a Allow @psalm-variadic to denote functions that use func_call_args 2016-10-18 17:55:07 -04:00
Matthew Brown
ca3dfe6e39 Fix Psalm errors in Psalm 2016-10-15 00:12:57 -04:00
Matthew Brown
6201957f76 Add a ton of docblocks 2016-10-14 00:53:43 -04:00
Matthew Brown
a444fd95c2 Fix miscellaneous var ids 2016-10-13 19:01:12 -04:00
Matthew Brown
c4648673bf Rename @suppress to @psalm-suppress 2016-10-11 14:17:55 -04:00
Matthew Brown
ae75296469 Use psalm-return in place of return if available 2016-10-03 21:36:42 -04:00
Matthew Brown
7565ee3fac Update docblock checker to see object-like types 2016-10-03 16:37:31 -04:00
Matthew Brown
8c5adf477a Add support for key/value array typing 2016-09-09 16:21:49 -04:00
Matthew Brown
719f6d1d62 Fix include call checks 2016-08-13 23:26:45 -04:00
Matthew Brown
7d1a106fd5 Big file reorg with ClassLikeChecker as new ClassChecker 2016-08-13 14:20:46 -04:00