1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

50 Commits

Author SHA1 Message Date
Brown
9ec8690825 Fix #1177 - prevent redundant condition leaking 2019-01-07 18:22:42 -05:00
Brown
8e5e3564bc Fix erroneous redundant condition warning 2018-12-19 16:10:09 -05:00
Matthew Brown
fd0ab47b80 Fix #1118 - detect possible issues with unions of mixed 2018-12-08 13:18:55 -05:00
Matthew Brown
26947888f6 Add some basic support for class_alias 2018-11-29 00:05:56 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matt Brown
dce8d14e1b Fix syntax errors in tests 2018-09-17 12:15:45 -04:00
Matthew Brown
334c463e08 Fix #977 - improve handling of orred expressions 2018-09-10 00:13:59 -04:00
Matt Brown
ffda44c3ba Fix #838 - check assertions, even outside conditionals 2018-06-25 18:02:05 -04:00
Matthew Brown
d4107f9e5e Fix issue erasing nullability of boolean 2018-06-17 13:47:31 -04:00
Matthew Brown
2c245b0a08 Fix #823 - trigger redundant condition on impossible assertions 2018-06-17 13:20:37 -04:00
Matt Brown
eb10b15cfc Improve reliability of elseif resolution 2018-05-30 18:56:44 -04:00
Matt Brown
772fd496b7 Fix issue with array_key_exists not having an effect 2018-05-24 12:23:50 -04:00
Matthew Brown
34a39b895c Support checks for array emptiness 2018-05-19 20:31:48 -04:00
Matt Brown
a0281e5716 Improve clause eradication after ifs 2018-05-14 16:29:51 -04:00
Matt Brown
c0729a02cd Fix remaining issues with logic checks 2018-05-07 14:52:45 -04:00
Matthew Brown
61aeea6375 Fix whole bunches of things 2018-05-07 01:26:06 -04:00
Matthew Brown
0181fce46f Fix #711 - concat ops contribute to loop map 2018-05-05 16:17:54 -04:00
Matthew Brown
048a32e7b6 Also check incremental overflows ref #691 2018-04-24 23:12:01 -04:00
Matthew Brown
35725267f9 Fix #691 - Allow comparisons to float for integer results 2018-04-24 23:02:20 -04:00
Radosław Kowalewski
15c1a82d8c Few fixes to make tests pass on windows
* changed / to DIRECTORY_SEPARATOR in expected messages
* cahnged most occurences PHP_EOL to "\n" in tests and src
* added output buffering in test to avoid marking test as risky
2018-04-12 22:41:13 -04:00
Matthew Brown
f15c26d7f4 Change how type impossibilities are treated to improve message types 2018-04-10 01:27:26 -04:00
Matt Brown
2b9a2d36cf Don’t allow non-existent vars to be overridden 2018-04-09 14:32:22 -04:00
Matt Brown
e5e0c56abc Don’t remove clauses on mixed, just substitute for wedges 2018-03-15 16:40:22 -04:00
Matt Brown
651b375c62 Fix #579 - improve checks for meta-type negation 2018-03-15 14:25:04 -04:00
Matt Brown
78cc1786c8 Don’t check newly-scoped vars in conditional 2018-02-08 14:46:06 -05:00
Matt Brown
72675cb5a0 Be more rigorous about atomic docblock type reconciliation 2018-02-08 13:01:39 -05:00
Matt Brown
7f4be858c2 Fix #498 - add better issue type for docblock contradiction 2018-02-07 15:20:47 -05:00
Matt Brown
1df4c3d196 Add DocblockTypeContradiction to find possible issues with docblock types
Fixes #491
2018-02-06 18:44:53 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matt Brown
be779382d1 Fix #428 - remove from_docblock on reconciled types 2018-01-08 10:32:58 -05:00
Matthew Brown
bb41b92789 Filter forumulae to remove assertions on unknowable things 2018-01-07 23:59:25 -05:00
Matt Brown
8ca5fbefea Invalidate clauses when assigning root vars 2017-12-15 17:34:21 -05:00
Matt Brown
3b4a7a97bc Don’t treat callmap scalar types as any sort of filtering mechanism
Fixes #393 and fixes #394
2017-12-15 16:48:06 -05:00
Matt Brown
b319f54ff6 Fix issue with equality of scalar types not from docblock 2017-12-14 11:23:20 -05:00
Matthew Brown
34c133d5d0 Add for post conditions to assignment map analysis 2017-12-13 22:04:37 -05:00
Matt Brown
301e393e37 Remove resource and callable from falsy checks 2017-12-11 11:32:14 -05:00
Matthew Brown
146cb12277 Refine function arguments if they match non-docblock equivalents 2017-12-10 21:14:30 -05:00
Matthew Brown
f8207fe490 Improve handling of try/catch blocks, suppressing RedundantCondition where necessary
Fixes #355
2017-12-10 17:36:33 -05:00
Matthew Brown
42dcd136ca Improve treatment of true and fix #369 2017-12-09 15:51:38 -05:00
Matthew Brown
13f290038a Improve RedundantCondition checks and add true type
Fixes #383
2017-12-09 14:53:39 -05:00
Matthew Brown
0eedad4f6a Add UndefinedGlobalVariable issue and asssociated Possibly... one 2017-12-06 00:56:00 -05:00
Matthew Brown
a87a1f0dc9 Make sure undeclared array offset vars have type mixed
Fixes #360
2017-12-06 00:35:41 -05:00
Matthew Brown
02dcb2be95 Get or LHS clauses after evaluating statements 2017-12-03 18:22:25 -05:00
Matthew Brown
181d1bb129 Don’t complain about redundant conditions for possibly undefined vars 2017-12-03 15:00:59 -05:00
Matthew Brown
a47675250a Set that a type is from docblock when substituting in docblock atomic type 2017-12-03 01:24:47 -05:00
Matthew Brown
be3212eb42 Remove conflicting clauses from switch assertions 2017-12-03 00:58:24 -05:00
Matthew Brown
3fca70c77b Always reemove clauses if from_docblock status has changed 2017-12-02 17:57:58 -05:00
Matthew Brown
6c9d90850a Don’t complain when there are duplicate clauses if due to an assignment
Fixes #356
2017-11-28 22:17:03 -05:00
Matt Brown
252fa8da78 Fix #346 by making a change in from_docblock invalidate clauses 2017-11-28 17:27:19 -05:00
Matthew Brown
f27bd50abe
Add RedundantCondition issue, replacing FailedTypeResolution (#344)
* Group changes

* Don’t worry about vars defined before exiting

* Fix issues with vars defined in conditionals

* Add failing test

* Only add failed reconciliation flag if nothing could be salvaged

* Avoid notice when removing clauses

* Improve handling of loops

* Fix evaluation of binary op expressions

* Remove unset vars from outer context after loop

* Ignore RedundantCondition in some more configs
2017-11-28 00:46:41 -05:00