1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00
Commit Graph

139 Commits

Author SHA1 Message Date
orklah
1a1b88bb5e
add visibilities to constants (#4219) 2020-09-20 12:54:46 -04:00
orklah
b19f0a7034
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
2020-09-19 18:26:51 -04:00
orklah
da47588f91
replace return; by return null; in every non-void method, add return null; when mising, add return types, remove redundant phpdoc (#4176) 2020-09-13 16:39:06 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Matthew Brown
ef0486ce35 Add some pure annotations 2020-08-23 13:52:31 -04:00
Brown
488a899823 Fix Psalm issues 2020-08-05 19:49:09 -04:00
kesselb
aaba3a08ec
Add option to supress a referenced but undefined global variable. (#3827) 2020-07-16 09:49:59 -04:00
orklah
76f5def268
Use scandir and glob flags to reduce their performance impact (#3499)
* Use scandir and glob flags to reduce their performance impact

* Order seem to impact Tests here
2020-05-30 17:02:35 -04:00
Brown
953be61cf2 Allow limiting connected taint paths 2020-05-25 23:28:11 -04:00
Brown
8bcf38b8f6 Fix #3193 - no longer add totallyTyped="true" to config 2020-04-19 12:58:42 -04:00
Brown
d868710b2b Fix handling of built arrays 2020-04-08 16:11:11 -04:00
Brown
43287812ce Suppress issue 2020-04-08 14:49:23 -04:00
Matthew Brown
a2fbfc1c9e Fix a couple of bugs 2020-02-21 01:32:22 -05:00
Matthew Brown
320f3ec863 Update level config name 2020-02-17 22:43:13 -05:00
Matthew Brown
ced092874a Make config generation smarter 2020-02-17 22:05:58 -05:00
Matthew Brown
be6cd0f8c6 Fix generation of files in non-psr directory 2020-01-16 23:24:53 -05:00
Brown
6d02aa86e8 Reconcile string emptiness a bit better 2019-12-13 15:51:54 -05:00
Joram Schrijver
e79a0cc8f0 Make --init use vendor-dir from composer.json (#2313) 2019-11-08 06:59:04 -05:00
Brown
c5ef2516b5 Fix #2150 - add detection for unnecessary @var annotations
And also remove them from codebase
2019-09-19 11:59:43 -04:00
Matthew Brown
6ea68e9f7f Clean up more unused @psalm-suppress annotations 2019-08-18 16:59:56 -04:00
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
feff357a75 Be smarter about discovering files 2019-05-10 18:07:13 -04:00
Brown
48d624e305 Fix #1619 - prevent tests from being added automatically on --init 2019-05-10 11:00:50 -04:00
Brown
9b75683796 Search better, and avoid fatal error 2019-05-09 19:34:38 -04:00
Brown
335b04186b Add autodiscovery of --init folders based on composer.json 2019-05-09 19:19:33 -04:00
Brown
dd40987187 Consolidate location of issue handling 2019-05-03 17:12:20 -04:00
Brown
d1574a64a4 Move issue type listing 2019-05-03 15:29:44 -04:00
Brown
0e4c8ce482 Split apart TypeCoercion issues, allowing more granular issue filtering 2019-04-25 18:02:19 -04:00
Brown
f5fcde6b89 Fix false casing 2019-04-12 15:39:38 -04:00
Brown
a86bbad796 Add support for regexes as referencedMethods 2019-04-12 15:15:21 -04:00
Tyson Andre
2e6a2f14ed Fix typos in psalm with codespell's dictionary 2019-03-24 23:01:20 -04:00
Andrii
21d383d6c6 🐛 #1225 Allow use lead asterisk wildcard in referenceClass 2019-02-01 07:59:44 -05:00
Brown
b5059f45a0 Allow users to ignore missing ignorefiles 2019-01-28 11:50:18 -05:00
Matthew Brown
930a8b2689 Fix #1225 - ignore classes using patterns 2019-01-21 16:48:12 -05:00
Matthew Brown
b43a6a31f1 Enable casing plugin and fix issues it found 2019-01-12 10:52:23 -05:00
Brown
5d5fbb1e9c Only add linked directories 2019-01-07 15:49:05 -05:00
Matthew Brown
07b29e4a2f Fix #1141 - add symlinked symlinked repos to directory list 2019-01-06 09:14:35 -05:00
Matthew Brown
21f29e7385 Fix #1108 - add support for referencedFunction to UndefinedFunction 2018-11-29 23:19:33 -05:00
Matthew Brown
4040626853 Add support for special *::someMethod syntax for referencedMethod
Fixes #1105
2018-11-28 20:09:20 -05:00
Matt Brown
17ea48eda4 Add ability to pretend that a file has declare(strict_types=1) 2018-08-29 15:10:56 -04:00
Matt Brown
2599d8bd62 Allow some folders to be excluded from type stats collection 2018-08-24 17:46:13 -04:00
Matt Brown
070e7903df Allow suppression of TooManyArguments by function/method id 2018-08-16 16:49:33 -04:00
Matthew Brown
2fee699d25 Fix #908 - dont’t emit UnresolvableInclude after file_exists check 2018-08-09 23:29:30 -04:00
Matthew Brown
952bc9bdfd Fix #84 - add pattern matching for files as well as directories 2018-06-05 20:15:18 -04:00
Matthew Brown
53bfafa02a Make sure that ignoreFiles files never appear in errors 2018-06-04 00:15:28 -04:00
Matthew Brown
c217849737 Improve handling of projects that use include/require heavily 2018-05-22 23:39:01 -04:00
Matthew Brown
a33d52d935 Add support for referencedProperty error restrictions 2018-05-11 00:07:41 -04:00
Matt Brown
87be0b5863 Change die($message) to explicit exit(1) 2018-04-17 11:48:29 -04:00
Matthew Brown
f15c26d7f4 Change how type impossibilities are treated to improve message types 2018-04-10 01:27:26 -04:00
Matthew Brown
5384f193d1 Allow class and method issues to be suppressed by their identifiers
Ref #603
2018-03-20 22:36:03 -04:00
Tyson Andre
aea3779c96 Fix unused imports in psalm, wrong param order doc comments (#523)
(Some of the imports appear as strings elsewhere in the same file)
2018-02-18 17:55:11 -05:00
Matt Brown
7f4be858c2 Fix #498 - add better issue type for docblock contradiction 2018-02-07 15:20:47 -05:00
Matt Brown
1d46124bab Fix issues found by detecting docblock type inconsistencies 2018-02-06 13:40:28 -05:00
Matthew Brown
fb9f20f4b8 Find unused properties with dead code checks
Fixes #424
2018-01-10 23:29: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
afcbc113c9 Fix #228, fix #336 by improving checking of inherited signatures 2017-11-26 16:03:17 -05:00
Tyson Andre
e2dd3db70f Fix phpdoc in psalm's codebase referring to missing params. (#273)
Also, don't use `@return self` in __construct, it returns void.
2017-11-08 23:32:22 -05:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Matthew Brown
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matthew Brown
754a4d9950 Allow Psalm to be run outside of the directory it's installed in (#154)
* Add --root option when not running Psalm from root directory

* Add informative error when running Psalm outside of its project directory

* Add better message in help

* Fix autoloader precedence
2017-05-04 14:25:58 -04:00
SignpostMarv
f71b4601e0 added quick globbing support for includes, does not satisfy vimeo/psalm#84 but is sort of related (#150) 2017-04-26 15:33:50 -04:00
Matthew Brown
bb9221ba01 Analyze die/exit expressions 2017-02-11 19:42:12 -05:00
Matthew Brown
f32fabd798 Remove dead code 2017-02-11 19:30:06 -05:00
Matthew Brown
8ff6634e7b Add issue for possibly unused variables in public/private methods
also changed a lot of access
2017-02-11 18:56:38 -05:00
Matthew Brown
cc500e8228 Eliminate dead code 2017-01-30 00:25:16 -05:00
Matthew Brown
6bcc763414 Fix #3 by checking inside __constructor calls for initialisations 2017-01-26 23:23:12 -07:00
Matt Brown
875717bb96 Fix #63 by adding directory separators 2017-01-17 22:10:21 -05:00
Matthew Brown
b3726c9de5 Use getcwd() for the project’s base, not the config file parent directory 2017-01-16 18:33:04 -05:00
Matthew Brown
e3a9cb98c3 Add extra issue for invalid clone and fix issue reporting; 2017-01-16 12:59:09 -05:00
Matthew Brown
856870cf37 Fix #62 - die quickly and explicitly if files cannot be located 2017-01-16 11:41:57 -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
685eaeb4fe Reimagine XML schema, fixes #21 2016-12-29 20:10:06 -05:00
Matthew Brown
b79ce904d2 Fix #23 - allow exclusion in projectFiles 2016-12-29 18:33:03 -05:00
Matthew Brown
749735a3ec Update config file API still further 2016-12-29 10:24:10 -05:00
Matthew Brown
ff466b7992 Change config API 2016-12-29 08:42:39 -05:00
Matt Brown
154d023a9d Add more robust config testing 2016-12-14 12:28:38 -05:00
Matthew Brown
4f95c67e1c Emit issues for null/mixed array access 2016-11-21 19:07:56 -05:00
Jon Ursenbach
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00
Matthew Brown
34af24a2b4 Add all the properties 2016-11-01 00:39:41 -04:00
Matthew Brown
604c875d0c Fix more errors caught by Psalm 2016-10-30 12:46:18 -04:00
Matthew Brown
ca3dfe6e39 Fix Psalm errors in Psalm 2016-10-15 00:12:57 -04:00
Matthew Brown
8c5adf477a Add support for key/value array typing 2016-09-09 16:21:49 -04:00
Matthew Brown
df28d24803 Change name to Psalm 2016-07-25 18:37:44 -04:00