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

7389 Commits

Author SHA1 Message Date
Matt Brown
5351a07cea
Fix analysis when there’s a break in a loop after a reassignment 2021-01-29 11:39:43 +01:00
David de Boer
a4b246406c
Fix: allowMissingFiles not respected for ignored files (#4259) 2021-01-29 11:39:43 +01:00
5e4faf20d7
Add SplStack, SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue stubs (#4255)
* Add SplStack, SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue stubs

* Add SplFixedArray
2021-01-29 11:39:43 +01:00
Brown
5e8e183667
Add improvements from unused variable checks 2021-01-29 11:39:43 +01:00
Brown
ee2149342e
Add more unused variable tests 2021-01-29 11:39:43 +01:00
Brown
cf2872c285
Ensure loop marks vars as possibly assigned 2021-01-29 11:39:43 +01:00
Bruce Weirdan
ecec9dd040
Fixes crash due to class/filename mismatch (#4247)
Introduced in 56cddd16bf
2021-01-29 11:39:43 +01:00
Brown
f5019d92e2
Fix unused var in finally false-positive 2021-01-29 11:39:43 +01:00
Brown
3776331be1
Require latest php-parser 2021-01-29 11:39:43 +01:00
Brown
1893147aed
Prevent duplicate switch return types 2021-01-29 11:39:43 +01:00
Brown
5177511a72
Fix test result 2021-01-29 11:39:42 +01:00
Brown
20edbd9b0c
Add extra loops for more reliable analysis 2021-01-29 11:39:42 +01:00
Brown
999a8aa4a8
Move taint graph functionality into its own object 2021-01-29 11:39:42 +01:00
Brown
d666d93950
Add more tests for unused variables 2021-01-29 11:39:42 +01:00
orklah
3afe1daeec
preg_split can't take null in limit (#4236)
* preg_split can't take null in limit

* fix wrong type in preg_split
2021-01-29 11:39:42 +01:00
aheart
19a25777af
Filter selected text to prevent invalid XML (#4234) 2021-01-29 11:39:42 +01:00
orklah
e3e5a55907
unused use statements (#4228) 2021-01-29 11:39:42 +01:00
Brown
e5880571d9
Add missing = true 2021-01-29 11:39:42 +01:00
orklah
8f1a948760
misc changes (#4227)
* misc changes

* misc changes
2021-01-29 11:39:42 +01:00
Brown
88a1a5e8bc
Propagate has_returned flag 2021-01-29 11:39:41 +01:00
Brown
dbdf4f383b
Fix fudging var 2021-01-29 11:39:41 +01:00
Brown
d40cc0b35b
Skip currently-failing undefined variable test 2021-01-29 11:39:41 +01:00
Brown
83c72ce876
Be a little bit more robust in finally handling 2021-01-29 11:39:41 +01:00
Brown
734b9c3833
Detect more issues inside finally block 2021-01-29 11:39:41 +01:00
Brown
ebe5841dd0
Make sure to union try-set vars 2021-01-29 11:39:41 +01:00
Brown
81626eee0f
Don’t forget control actions 2021-01-29 11:39:41 +01:00
Brown
0856354b48
Rename TaintGraph to ControlFlowGraph because it’s about to do more 2021-01-29 11:39:41 +01:00
Brown
364f8f1a01
Add back necessary suppression 2021-01-29 11:39:40 +01:00
Brown
a6950c36e0
Revert StatementsAnalyzer change 2021-01-29 11:39:40 +01:00
Brown
c288dac4de
Fix tests 2021-01-29 11:39:40 +01:00
Brown
b9c33aaa03
Improve file-based suppression of taints 2021-01-29 11:39:40 +01:00
Brown
dbe4b4c708
Localise taint analysis better 2021-01-29 11:39:40 +01:00
Brown
6cf6e22b44
Add to StatementsAnalyzer taint object instead of Context 2021-01-29 11:39:40 +01:00
Brown
291c067dc5
Rename Taint object to TaintGraph 2021-01-29 11:39:40 +01:00
orklah
13c291c63f
useless comparison (#4223)
* remove unused code

* fix wrong fix
2021-01-29 11:39:40 +01:00
orklah
9f00b8536a
fix test on windows (#4225) 2021-01-29 11:39:40 +01:00
Brown
acd4c63857
Use shuffled files 2021-01-29 11:39:40 +01:00
orklah
f1aba254be
Use array destructuring when possible (#4221)
* list usage

* fix inversion
2021-01-29 11:39:39 +01:00
orklah
69be386072
remove incorrect inheritDoc (#4220) 2021-01-29 11:39:39 +01:00
orklah
f6450e313f
add visibilities to constants (#4219) 2021-01-29 11:39:39 +01:00
Brown
c0bf0a8fa7
Fix #4198 - make analysis of class-string property assignments more robust 2021-01-29 11:39:39 +01:00
orklah
b559951bf4
replace deprecated methods with their equivalent (#4217) 2021-01-29 11:39:39 +01:00
orklah
ba202b7ad3
Misc improvements (#4216)
* misc changes

* fix CI
2021-01-29 11:39:39 +01:00
orklah
3652d51275
Remove empty() and use strict comparison when safe (#4211)
* replace empty usage with stricter checks

* use strict comparison when safe

* replace is_null with === null for consistency
2021-01-29 11:39:39 +01:00
Brown
6a4df30868
Meke staticy methods properly static 2021-01-29 11:39:39 +01:00
Brown
5302936e76
Fix #4206 - add shortcut for if ((bool) $foo) 2021-01-29 11:39:39 +01:00
Brown
ec64ae930a
Fix a couple of false-positive redundant conditions 2021-01-29 11:39:38 +01:00
Brown
1b10f11217
Fix tests 2021-01-29 11:39:38 +01:00
Brown
ff2c18aa67
Fix #4208 - array with possibly-undefined keys isn‘t really sealed 2021-01-29 11:39:38 +01:00
Brown
e7333ec4db
Fix #4209 - allow hinting arrow function return type 2021-01-29 11:39:38 +01:00