1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-16 03:17:02 +01:00
Commit Graph

42 Commits

Author SHA1 Message Date
Matt Brown
4bf652863b Also check for non-false returns on LessSpecificReturnType 2018-03-07 11:16:56 -05:00
Matt Brown
1d46124bab Fix issues found by detecting docblock type inconsistencies 2018-02-06 13:40:28 -05:00
Matthew Brown
44b8b22995 Improve checks for unused variables and params 2018-01-28 17:28:34 -05:00
Matthew Brown
ea28ee709d Improve unused variable detection slightly 2018-01-25 01:04:26 -05:00
Matthew Brown
68b00ea49a Add automatic fix for PossiblyUndefinedVariable 2018-01-21 16:24:20 -05:00
Matthew Brown
3b7c84f484 Detect instances where loop invariants are invalidated
Fixes #389
2017-12-17 10:58:03 -05:00
Matthew Brown
2a7b48ce5f Add support for infinite loops
Fixes #381
2017-12-06 23:46:41 -05:00
Matthew Brown
d20b8d3034
Improve loop analysis (#365) 2017-12-02 18:28:18 -05:00
Matthew Brown
888b5dae00 Move LoopChecker into its own file 2017-11-30 01:07:20 -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
Matthew Brown
c86e73ddb6 Always keep track of referenced var ids
which we can use for analysis elsewhere
2017-11-24 12:17:28 -05:00
Matthew Brown
bc35f88859 Fix issue with $this instanceof checks in traits 2017-06-23 00:39:37 -04:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matt Brown
14bb967c7d Warn when doing === comparisons on incompatible types 2017-04-06 14:53:45 -04:00
Matthew Brown
dcedd65215 Add check for paradoxical statements 2017-04-02 15:26:10 -04:00
Matthew Brown
b1b7b0ae35 Only include vars asserted in where 2017-03-18 16:34:44 -04:00
Matthew Brown
c33e66813a Move type algebra functionality to separate checker 2017-03-18 13:37:00 -04:00
Matthew Brown
9b41bc9b37 Add slower (but more accurate) loop checks 2017-03-14 20:14:25 -04:00
Matt Brown
3d2be3410e Infer loop types without @var comments 2017-03-13 18:06:56 -04:00
Matthew Brown
cd5f727d2e Collect explicit references to classes/methods 2017-02-26 23:09:18 -05:00
Matthew Brown
48335b6fee Fix potential invalid arg 2017-02-22 00:42:50 -05:00
Matt Brown
a56456a719 Add merging of vars_possibly_in_scope back 2017-02-21 17:41:54 -05:00
Matt Brown
fa35c0efa9 Remove changed vars from clauses in while loop to prevent re-application of logic 2017-02-21 17:19:15 -05:00
Matt Brown
2c7ffb6f4c Add support for negating some while assertions 2017-02-21 16:52:27 -05:00
Matthew Brown
7cd1b27ff1 Add more support for logical and/or 2017-02-16 21:00:45 -05:00
Matthew Brown
a4323359d3 Fix ternary/which/for conditionals 2017-02-12 18:47:02 -05:00
Matt Brown
32d85e20da Remove unused vars 2017-02-10 19:10:13 -05:00
Matthew Brown
d3abc0011d Fix #80 - add dead code checks via command line 2017-01-31 23:24:33 -05:00
Matthew Brown
7f8a3d798e Improve clause resolution in while loops 2017-01-31 01:30:11 -05:00
Matthew Brown
17329015dc Discriminate between checking, visiting and analyzing in method names 2017-01-07 15:09:47 -05:00
Matthew Brown
694da2cabd Simplify a lot of APIs 2017-01-07 14:35:07 -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
ea30af8a5a Move assertion checks into separate file 2016-12-28 15:52:44 -05:00
Matthew Brown
6972c45c14 Remove vars from parent clauses when they are reconciled with vars 2016-12-28 14:20:16 -05:00
Matthew Brown
1e8f986d8c Narrow down error lines for reconcileKeyedTypes 2016-12-11 13:59:36 -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
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
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00
Matthew Brown
f3f1ba1caa Break out block checkers 2016-10-22 17:35:59 -04:00