1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

5010 Commits

Author SHA1 Message Date
Brown
14b37b95af Fix potential recursion 2019-08-06 17:29:44 -04:00
Brown
0051636a99 Expose code location raw line number 2019-08-06 17:11:25 -04:00
Brown
fc8d2bd563 Do more taint creation for magic properties 2019-08-06 14:27:21 -04:00
Brown
37d93141c4 Only register taints on known magic properties 2019-08-06 13:05:34 -04:00
Brown
0dc6b74fb4 Add taintedness to magic property fetches 2019-08-06 12:54:12 -04:00
Brown
17753865f3 Add detection to mixed params 2019-08-06 10:33:21 -04:00
Matthew Brown
8f6d432dd0 Add support for magic property comprehension 2019-08-05 23:19:22 -04:00
Brown
6eb62591ab Specialise calls when functions are pure 2019-08-05 18:33:33 -04:00
Brown
87bf907c1e Fix echo checks 2019-08-05 10:21:23 -04:00
Matthew Brown
b2c0993cdc Add framework for taint analysis to Psalm
Ref #611
2019-08-04 10:37:36 -04:00
Matthew Brown
ea1f9874fb Remove more memory leaks 2019-08-02 01:55:24 -04:00
Jeffrey Yoo
73a6fbe557 catch cases of invalid use of backslash (#1983) 2019-08-01 16:10:12 -04:00
Brown
6a213a60aa Make test name align with tested thing 2019-07-31 17:42:01 -04:00
Brown
3a1a3ebc47 Fix #1980 - don’t complain about UnusedVariable after continue 2019-07-31 17:35:56 -04:00
Brown
f9d99498a6 Remove unused var 2019-07-31 17:30:31 -04:00
Brown
c67e38aded Rename var to be more uniform 2019-07-31 17:14:00 -04:00
Chad Burrus
7ded79bb27 typo fix : "you" -> "your" (#1976) 2019-07-30 13:22:26 -04:00
Matthew Brown
f718c2fca1 Fix #1974 - prevent bad property defaults on static properties 2019-07-29 22:18:46 -04:00
Matthew Brown
c887d907e3
Add missing return type 2019-07-28 20:42:35 -04:00
Matthew Brown
90854c4094 Fix broken behaviour when analysing interface test methods 2019-07-28 19:44:36 -04:00
Matthew Brown
f432cc0884 Fix #1846 - warn about missing interface return types 2019-07-28 19:03:12 -04:00
Matthew Brown
c356b579fd Prevent empty @template-extends docblock from being a fatal error
Fixes #1963
2019-07-28 16:47:06 -04:00
Matthew Brown
de932c4c18 Fix #1972 - improve understanding of how setcookie works 2019-07-28 16:40:35 -04:00
Matthew Brown
e58ade5803 Allow lower-cased constant names 2019-07-28 10:06:47 -04:00
Matthew Brown
2f400381a5 Fix #1973 - bust method mutation cache when reloading language server 2019-07-28 10:05:51 -04:00
Brown
8cb5d012d9 Check expressions in variable name static calls 2019-07-25 09:45:11 -04:00
Matthew Brown
2c89a97f91 Fix #1970 - make sure reconciled types are templated 2019-07-25 08:33:27 -04:00
Matthew Brown
5a4a133f50 Fix #1970 - allow comparison to templated param class 2019-07-24 22:13:51 -04:00
Brown
352f18b169 Register so it doesn’t get removed 2019-07-24 17:41:13 -04:00
Brown
5770a6c904 Add support for compact 2019-07-24 17:24:23 -04:00
Brown
ea2074b19b Allow suppression of unused variable issues 2019-07-24 17:01:41 -04:00
Brown
862f48503f Fix tests 2019-07-24 17:00:27 -04:00
Brown
e22e0ac92c Fix unused ref in assign op
Fixes #1968
2019-07-24 16:53:14 -04:00
Jeffrey Yoo
ed61bcafda Issue 1926 unused variable (#1967)
* add support for Psalter to remove UnusedVariable

* fix issues found by Psalm

* fix stylistic issues found by phpcs

* added more stylistic changes and suppressed UndefinedClass error for Psalm

* suppress TypeDoesNotContainType error for CheckTrivialExprVisitor

* fix whitespace issue raised by phpcs

* fix bug where partial removal of assignment by ref does not process '&' symbol

* Remove workspace files

* remove 'Array_' and 'ArrayItem' classes from blacklist and add 'New_' class to the blacklist
2019-07-24 16:48:54 -04:00
Mikko Pesari
82e79aae20 Fix ignoreExceptions tags (#1966) 2019-07-24 07:50:40 -04:00
Pavel Batečko
90d020d6fc Improve DOM extension types (#1965)
* Improve DOM extension types

* fixup! Improve DOM extension types
2019-07-23 22:53:31 -04:00
Matthew Brown
c76380174f Fix infinite recursion on property types 2019-07-22 23:54:33 -04:00
Brown
c283f0877d Analyse binary ops always 2019-07-22 18:04:52 -04:00
2e3s
f15cc7dd5b Mark private properties unused when referenced only in constructor (#1962)
* Mark private properties unused when referenced only in constructor

If a private property is used only in constructor then most likely
it's a dead code since there is no need to have the class property.
But such static properties can be accessed between the calls.

* Ignore the private property issue on alter

* Fix the related dead code psalm

* Add a missing condition into the test
2019-07-21 23:29:16 -04:00
Matthew Brown
d13d37b75d Prefix constant 2019-07-21 16:38:39 -04:00
Matthew Brown
c5d1c9aa54 Add slash 2019-07-21 16:22:04 -04:00
Matthew Brown
272ab3519d Normalise plugin path 2019-07-21 11:56:33 -04:00
Matthew Brown
3f098bafbc Also convert \\ to / when scanning windows configs on macs 2019-07-21 11:34:32 -04:00
Matthew Brown
39c437a54a Fix file path weirdness when scanning config files 2019-07-21 11:32:49 -04:00
Matthew Brown
3d4adee6b3 Reduce with / before converting back 2019-07-21 11:03:02 -04:00
Matthew Brown
76508e6d64 Improve behaviour of templated template assertions
Fixes #1956
2019-07-21 01:40:19 -04:00
Matthew Brown
3516b48173 Break out templated assertion tests 2019-07-21 01:10:33 -04:00
Tyson Andre
de51178178 Restore gitignore for .*.swp in sub-directories (#1958)
The `/.*.swp` will only ignore swp files in the root of this project.
(not sub-folders)
It won't ignore swp files in src/, etc.
2019-07-19 16:49:10 -04:00
Andrey Bolonin
cb34810cdd add php 7.4snapshot (#1948)
* add php 7.4snapshot

* Allow 7.4snapshot to fail
2019-07-19 08:20:54 -04:00
Tyson Andre
5d5a9c6eac Remove redundant casts and unused use statements (#1955)
* Remove redundant casts

(not sure about older versions of php-parser)

* Remove unused use statements
2019-07-18 23:37:36 -04:00