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

41 Commits

Author SHA1 Message Date
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
Matt Brown
47255fb19b Fix array key check after direct assignment 2018-04-09 18:02:45 -04:00
Matt Brown
4873228e52 Fix #561 - add all the do-defined vars before checking loop 2018-03-08 11:17:27 -05:00
Matt Brown
30ca2ad65f Fix issues with mixed assignments inside loop 2018-02-08 14:02:32 -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
4b87612bb4 Add better issue message for bad array offset
Fixes #492
2018-02-06 11:27:01 -05:00
Matt Brown
d88eadbb0e Fix #486 - skip first reconciliation in loop checker for do stmts 2018-02-06 11:07:52 -05:00
Matt Brown
c7b2ae4e0e Fix do while nullability issue 2018-01-29 17:18:03 -05:00
Matt Brown
450618cc35 Treat do expression as statements plus loop 2018-01-25 13:46:17 -05:00
Matthew Brown
b06cfd025a Allow continue inside case statement as alias for break
Fixes #464
2018-01-24 00:01:08 -05:00
Matt Brown
4b4e09277c Fix #450 - add checks for duplicate array keys
And fix the embarassing errors in tests
2018-01-18 17:16:50 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
3b7c84f484 Detect instances where loop invariants are invalidated
Fixes #389
2017-12-17 10:58:03 -05:00
Matthew Brown
13f290038a Improve RedundantCondition checks and add true type
Fixes #383
2017-12-09 14:53:39 -05:00
Matt Brown
eca7351472 Add return-level issues as well as function-level ones
Fixes #379
2017-12-07 15:50:25 -05:00
Matthew Brown
2a7b48ce5f Add support for infinite loops
Fixes #381
2017-12-06 23:46:41 -05:00
Matt Brown
6c84fecce9 Always update the parent context from the loop context
Fixes #377
2017-12-06 19:20:24 -05:00
Matthew Brown
0eedad4f6a Add UndefinedGlobalVariable issue and asssociated Possibly... one 2017-12-06 00:56:00 -05:00
Matt Brown
d10898b853 Remove code that only caused pain 2017-12-05 16:54:24 -05:00
Matt Brown
98085b2267 Fix #371 - improve handling of do statements broken in loop refactor 2017-12-05 11:05:10 -05:00
Matthew Brown
cff7f35d00 Change __toString type conversions to more precise getId checks 2017-12-03 12:44:08 -05:00
Matthew Brown
9a83990053 Clear clauses made redundant by pre-loop assignments 2017-12-02 20:02:29 -05:00
Matthew Brown
d20b8d3034
Improve loop analysis (#365) 2017-12-02 18:28:18 -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
fd3de443b2 Update loop with union of existing types 2017-11-21 22:13:46 -05:00
Matthew Brown
90bcd99eab Fix issue where array_shift/array_pop didn’t mark array as modified 2017-11-19 21:36:09 -05:00
Matthew Brown
36a760657d Fix #311 and introduce PossiblyInvalidArrayOffset 2017-11-16 00:27:11 -05:00
Matthew Brown
44c40dff4f Fix #270 by looking at root ids when analysing array assignment in loops 2017-11-08 08:23:34 -05:00
Matt Brown
76ba419330 Group unused tests together 2017-07-25 17:04:58 -04:00
Matt Brown
ac70ea31b2 Change test assertion keying 2017-06-29 10:22:49 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Jon Ursenbach
11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00
Matt Brown
7fad81edac Fix issue with unset var in loop 2017-03-15 11:38:23 -04:00
Matthew Brown
c0a646bbc5 Add test for tail-set var 2017-03-14 20:16:41 -04:00
Matthew Brown
6cfe540c98 Fix issue evaluating elseif empty assertions 2017-03-14 15:48:52 -04:00
Matt Brown
b3bb8b72cc Add additional tests 2017-03-13 18:07:36 -04:00
Matt Brown
20791bfae6 Add third loop test 2017-03-13 11:53:16 -04:00
Matt Brown
7a652ee4bf Add tests for things we do not want to emit errors 2017-03-13 11:22:42 -04:00
Matt Brown
2c7ffb6f4c Add support for negating some while assertions 2017-02-21 16:52:27 -05:00
Matt Brown
99dd3ba5de Move loop scope tests into separate file 2017-02-21 16:33:20 -05:00