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

47 Commits

Author SHA1 Message Date
Matt Brown
b35db3e523 Reorganise things a little 2020-11-03 16:15:54 -05:00
orklah
ceaaa39ec3
improve phpdoc (#4352) 2020-10-17 12:36:44 -04:00
Matt Brown
8d2e88ef41 Fix #4333 - don’t get tripped up on try with no catches 2020-10-15 10:15:55 -04:00
Matt Brown
e9b520d72d Ignore precondition issues in loop 2020-10-07 20:24:50 -04:00
Matt Brown
14efde286f 4.x - refactor unused variable detection
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
2020-09-30 12:28:13 -04:00
Matt Brown
169b2b7023 Fix analysis when there’s a break in a loop after a reassignment 2020-09-30 00:04:07 -04:00
Brown
19f88a2e31 Add improvements from unused variable checks 2020-09-28 00:45:02 -04:00
Brown
1afbce82ca Ensure loop marks vars as possibly assigned 2020-09-27 17:50:48 -04:00
Brown
d52d7ef6aa Add extra loops for more reliable analysis 2020-09-25 00:59:58 -04:00
orklah
a9a364e363
Misc improvements (#4216)
* misc changes

* fix CI
2020-09-20 08:55:28 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
988e17f11d Make clause fully immutable 2020-08-26 15:35:29 -04:00
Brown
12798d1cab Prevent access to possibly unset var 2020-08-17 15:25:13 -04:00
Brown
1745f5cafa Fix too-long line 2020-07-02 15:32:13 -04:00
Brown
0c582e9993 Fix #3685 - improve handling of if conditionals inside do 2020-07-02 13:59:59 -04:00
Brown
3554aa4435 Fix crash newly introduced 2020-05-11 09:34:07 -04:00
Matthew Brown
4b388a2951 Fix ref 2020-05-10 11:35:35 -04:00
Brown
55222573ea Mark as possibly-undefined any variable that wasn’t present when the loop began
Fixes #3332
2020-05-10 11:17:50 -04:00
Brown
9e6797d297 Add protection from ComplicatedExpression 2020-04-30 22:23:07 -04:00
Brown
e17cfd8dba Fix #3125 - only apply clauses where applicable 2020-04-12 21:50:10 -04:00
Matthew Brown
47c1470e3b Refactor reference checks to use more appropriate properties 2020-03-28 16:30:56 -04:00
Matthew Brown
6c7f89b0ab Fix #2920 - track unevaluated code after nested returns 2020-03-15 14:31:41 -04:00
Matthew Brown
43189b3d55 Allow types to be traversed 2020-03-14 23:54:51 -04:00
Brown
15808458cc Better understand nesting loops and switches
Fixes #2700
2020-01-27 12:17:12 -05:00
Brown
0e39759ed6 Improve solution to #2546 slightly 2020-01-03 10:56:47 -05:00
Matthew Brown
02fbf12337 Only warn about clauses in the currently-scanned conditional 2019-12-08 16:35:56 -05:00
Matthew Brown
83b10bb9af Fix #2426, or at least some of it 2019-12-08 00:49:34 -05:00
Matthew Brown
df395944f8 Change how $changed_var_ids is communicated 2019-12-07 01:23:35 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Matthew Brown
4aeb28aceb Fix #2244 - correctly check do while expression before use 2019-10-20 14:18:30 -04:00
Brown
10b8a94564 Fix #2007 - improve unused variable detection in always-entered loops 2019-08-12 16:01:24 -04:00
Brown
c67e38aded Rename var to be more uniform 2019-07-31 17:14:00 -04:00
Matthew Brown
678d4e5286 Fix #1901 - improve loop-based handling of vars after continue 2019-07-04 20:38:52 -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
c66a106622 Improve performance by doing less cloning
Ref #1837
2019-06-26 00:14:06 -04:00
Brown
8c653b0312 Improve dead code detection a little more 2019-05-20 18:25:11 -04:00
Matthew Brown
7c2fe53446 Fix #1391 - find dead code in assignments to self 2019-05-12 23:31:36 -04:00
Matthew Brown
12f1ffca11 Fix issue reconciling mixed vars inside loop 2019-02-18 11:39:05 -05:00
Matthew Brown
8bc17e47be Fix #1227 - allow genric params in @psalm-assert 2019-01-22 23:42:54 -05:00
Brown
ca1a615026 Don’t call reconciliation on empty vars 2018-12-17 15:23:56 -05:00
Matthew Brown
fd0ab47b80 Fix #1118 - detect possible issues with unions of mixed 2018-12-08 13:18:55 -05:00
Matthew Brown
b32000fa05 Fix #689 - add checks for @internal annotations 2018-12-01 18:37:49 -05:00
Brown
254a14f621 Allow assertion redundant conditions to be suppressed 2018-11-14 13:44:20 -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