1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 02:07:37 +01:00
Commit Graph

265 Commits

Author SHA1 Message Date
Matthew Brown
473a174f23 Memoise type tokenisation and move functions to more logical locations 2018-02-04 12:23:32 -05:00
Matthew Brown
8e0998e081 Break apart the Codebase class 2018-02-03 18:56:54 -05:00
Matthew Brown
44b8b22995 Improve checks for unused variables and params 2018-01-28 17:28:34 -05:00
Matt Brown
a2d11cce51 Fix static/self return type handling 2018-01-26 13:51:00 -05:00
Matthew Brown
ea28ee709d Improve unused variable detection slightly 2018-01-25 01:04:26 -05:00
Matt Brown
24cbe6a52a Fix #466 - initialize variable 2018-01-24 13:52:34 -05:00
Matthew Brown
b06cfd025a Allow continue inside case statement as alias for break
Fixes #464
2018-01-24 00:01:08 -05:00
Matthew Brown
68b00ea49a Add automatic fix for PossiblyUndefinedVariable 2018-01-21 16:24:20 -05:00
Matthew Brown
bc9761f6c9 Create Codebase out from ProjectChecker 2018-01-21 13:45:33 -05:00
Matthew Brown
e05a7c00cc Break FileScanner out from FileChecker 2018-01-21 12:44:46 -05:00
Matthew Brown
bd6e4a09bd Refactor to break up too-large-files 2018-01-14 12:09:40 -05:00
Matthew Brown
e402ae978a Fix Array_ items nullability 2018-01-13 18:33:32 -05:00
Matthew Brown
5bae869dc6 Break file manipulation out into Psalter 2018-01-07 17:25:23 -05:00
Matt Brown
928b01a7c7 Find and fix code issues where functionality is available 2018-01-07 17:25:23 -05:00
Matthew Brown
c9173c7da3 Add more specific issues for falsable/nullable invalid return types 2018-01-04 21:36:16 -05:00
Matthew Brown
8a8253ac4c Fix indentation 2018-01-02 21:23:48 -05:00
Matthew Brown
81cfe09fae Improve reporting of classlike locations in docblocks 2018-01-01 20:04:03 -05:00
Matthew Brown
81efe28f79 Fix #403 by complaining about return values in void functions 2017-12-28 21:49:03 +01:00
Matthew Brown
b96ab18d4b Improve throw issue message 2017-12-28 21:35:25 +01:00
Matthew Brown
b8c349166e Add InvalidCatch and InvalidThrow to prevent erroneous exceptions
Fix #411 and fix #412
2017-12-28 20:40:28 +01:00
Matthew Brown
ec92b40ed3 If class checking fails for storage reasons, don’t quit analysis 2017-12-23 01:26:08 +01:00
Matthew Brown
abc9c051a9 Improve analysis of constant arrays 2017-12-19 09:48:01 -05:00
Matthew Brown
3b7c84f484 Detect instances where loop invariants are invalidated
Fixes #389
2017-12-17 10:58:03 -05:00
Matt Brown
52c414f1d2 Fix return {expr} checks for void functions 2017-12-14 12:50:02 -05:00
Matthew Brown
e55fe2f158 Don’t complain about possibly undefined vars when calling unset
Fixes #139
2017-12-13 19:46:58 -05:00
Matthew Brown
146cb12277 Refine function arguments if they match non-docblock equivalents 2017-12-10 21:14:30 -05:00
Matt Brown
bfccdb417f Pass through ignore_nullable_issues flag when verifying return statements 2017-12-07 16:08:09 -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
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
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
afcbc113c9 Fix #228, fix #336 by improving checking of inherited signatures 2017-11-26 16:03:17 -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
942bc0a663 Add new MixedTypeCoercion issue, fixes #320 2017-11-19 13:42:48 -05:00
Matthew Brown
b2ae9a2892 Fix #291, #292 and #297 by improving docblock parsing 2017-11-14 21:43:31 -05:00
Matthew Brown
765d82548d Remove more dead code 2017-11-08 23:27:51 -05:00
Tyson Andre
b3505cfbef Get rid of unused variables in psalm's codebase (#272)
* Remove unused variables

* Fix more unused variables

* Fix remaining detected undefined variables

Other 20 detected undefined variable warnings were false positives.
2017-11-08 23:14:27 -05:00
Matt Brown
e0371aed62 Introduce file manipulation concept to plugins 2017-11-07 14:46:53 -05:00
Matthew Brown
35e6cf8108 Change MissingInclude to MissingFile 2017-10-29 17:36:02 -04:00
Matthew Brown
b618bd798d Add new issues for missing required files 2017-10-29 14:39:23 -04:00
Matt Brown
8b7d82ddf6 Fix #2 - suppress errors for single lines 2017-10-26 18:19:19 -04:00
Matthew Brown
38c8a1d9cf Stop analysing statements if expression has errors 2017-10-12 20:24:22 -04:00
Matthew Brown
6b4bd47ddb Fix #181 and #225 - resolve problems with self in comments/return statements 2017-10-07 10:22:52 -04:00
Matthew Brown
9a3cb742cb Refactor docblock manipulation and add tests for it 2017-09-16 12:45:20 -04:00
Matthew Brown
fbc6379275 Fix #202 - vars changed inside loops should invalidate clauses 2017-08-18 22:41:25 -04:00
Matt Brown
c626b7d68a Fix #200 - allow mapping of more callable strings, and callable arrays 2017-08-14 19:30:11 -04:00
Matt Brown
0b0e7aa662 Fix #197 - allow nested class and function definitions 2017-08-14 15:46:01 -04:00
Matt Brown
a7baa7e928 Support callable checks on inline-defined functions 2017-08-11 19:05:04 -04:00