1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 02:27:59 +01:00
Commit Graph

169 Commits

Author SHA1 Message Date
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
Brown
5905171b79 Fix api 2020-08-31 16:40:46 -04:00
Brown
64f08fa9dc Improve Closure::fromCallable handling 2020-08-29 22:02:58 -04:00
Matthew Brown
ef0486ce35 Add some pure annotations 2020-08-23 13:52:31 -04:00
Brown
966a3522ff Move words 2020-08-11 14:36:59 -04:00
feek
7fe7146dc3
docs: provide some background as to what certain hooks are for (#3978) 2020-08-11 07:29:45 -04:00
lhchavez
ab3016af6e
Fix File-related analysis plugin hooks (#3970)
This change does a few things:

* Renames `BeforeAnalyzeFileInterface` to `BeforeFileAnalysisInterface`.
* Adds a few more parameters to `BeforeFileAnalysisInterface`.
* Since the analysis was never called due to a bug, the above two
  changes are safe to do.
* Fix the above-mentioned bug, and now adds the hooks to the config.
* Update the documentation about the File-related analysis plugin hooks.
* Add a test to ensure that this does not break again in the future.

Fixes: #3969
2020-08-10 10:49:53 -04:00
Matthew Brown
50cc3a8afa Align paramter names 2020-08-09 23:19:59 -04:00
feek
d60ece752c
chore: mark as lowercase string (#3392) 2020-05-18 16:02:46 -04:00
Brown
111303d913 Add non-empty-lowercase-string type 2020-05-15 10:18:05 -04:00
feek
7dd1823c4c
fix: code location is nullable (#3334) 2020-05-10 21:12:10 -04:00
orklah
8571746f8a
Add hook for plugins after FunctionLikeAnalysis (#3258) 2020-04-28 15:30:51 -04:00
Matthew Brown
196a0a5c4e Replace issue data array with object 2020-02-16 18:24:40 -05:00
Philip Hofstetter
395cf587d3 add plugin hook to be called after every function call
compared to AfterFunctionCallAnalysisInterface which gets only called
after a call to a function declared within the project, a plugin
implementing AfterEveryFunctionCallAnalysisInterface will get called for
every function call, including calls of PHP builtins.

On the other hand, this interface doesn't allow modification of the code
nor tweaking the return type, but it's still useful for accounting
purposes and for depreacting calls to PHP builtins

this fixes #2804
2020-02-13 09:10:24 -05:00
Markus Staab
45468d801f Dont corrupt checkstyle xml 2020-02-09 15:54:37 -05:00
Matthew Brown
947765c1c6 Improve count checks slightly 2020-01-22 07:51:24 -05:00
Ben Davies
5139d61171 remove unnecessary loops (#2671) 2020-01-22 07:42:00 -05:00
Matthew Brown
8202af957d Index issues by file to reduce some lookups 2020-01-21 21:07:44 -05:00
Bruce Weirdan
ede1076039 Dropped unused use (#2495) 2019-12-21 00:58:05 +00:00
Bruce Weirdan
7e8268fe94 Drop non-existent param from docblock (#2492)
I wonder why psalm didn't catch it.
2019-12-21 00:14:22 +00:00
Matthew Brown
c9b5e96b0f Fix ref 2019-12-13 08:11:04 -05:00
Matthew Brown
d9cae720c1 Add slash 2019-12-03 08:33:31 -05:00
Matthew Brown
016fd58547 Add command in help 2019-12-03 02:18:44 -05:00
Matthew Brown
9f69d9ac99 Add CI_BRANCH var 2019-12-03 00:44:19 -05:00
Matthew Brown
a35d5f1308 Add temporary logging 2019-12-03 00:36:26 -05:00
Matthew Brown
843c08b8e1 Add emojis 2019-12-03 00:33:14 -05:00
Matthew Brown
946a46a761 Log when data is sent successfully 2019-12-03 00:13:46 -05:00
Matthew Brown
526aa000ef Set git data from Github Actions 2019-12-01 19:16:21 -05:00
Matthew Brown
e47f5e774b Send more info from shepherd 2019-12-01 17:20:26 -05:00
Brown
f8f8b633b1 Suppress a bunch of PossiblyUndefinedArrayOffset issues 2019-10-01 15:44:43 -04:00
Tyson Andre
ce03be2dc0 Add BeforeAnalyzeFileInterface (#2034)
This is a prerequisite of the plugin I mentioned in #378

This may be useful for other types of plugins
(e.g. checking raw file contents or file names)
2019-08-18 10:40:07 -04:00
Brown
eb1cd2ed46 Separate out error message producer 2019-07-16 15:34:02 -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
Ilija Tovilo
5a14e4b1cf Progress bar (#1709)
* Revert "Revert "Implement better progress""

This reverts commit 4302596654.

* Revert "Revert "Implement dots progress bar""

This reverts commit e41733d789.

* Revert "Revert "Switch to VoidProgress by default""

This reverts commit 304ffeb0a3.

* Revert "Revert "Pass success flag to progress""

This reverts commit 62a690ee4e.

* Improve socket communication

* Use an underscore

* Add means to disable progress

* Add extra newline before progress bar
2019-05-30 10:30:41 -04:00
Matthew Brown
4302596654 Revert "Implement better progress"
This reverts commit 042070d0fd.
2019-05-27 13:07:02 -04:00
Ilija Tovilo
042070d0fd Implement better progress 2019-05-26 23:18:48 -04:00
Matthew Brown
a1eb191f57 Remove TSqlSelectString and related dependency 2019-05-20 23:14:41 -04:00
Brown
6e010d9db9 Remove type coverage map, as it’s not ready for prime-time 2019-04-12 11:32:35 -04:00
Matthew Brown
f1ccbce338 Use new endpoint 2019-04-01 21:34:24 -04:00
Matthew Brown
d421d91a2a Dump the data that matters 2019-03-31 20:47:33 -04:00
Matthew Brown
6668228ff5 Sanitise some inputs 2019-03-31 20:37:02 -04:00
Matthew Brown
e3f37089f4 Add environment variables list to failing shepherd call 2019-03-31 20:16:39 -04:00
Matthew Brown
fea61d9897 Shepherd plugin is basically not testable 2019-03-31 19:51:47 -04:00
Matthew Brown
517415029a Add more verbose output 2019-03-31 19:20:05 -04:00
Matthew Brown
8116c48f6c Add line break 2019-03-31 15:42:15 -04:00
Matthew Brown
d6b3ecaab8 If the function does not exist, exit early 2019-03-31 15:42:15 -04:00
Matthew Brown
326249e13b spirit => shepherd 2019-03-31 14:02:30 -04:00
Brown
8872a8e70a Add Psalm output if spirit errors 2019-03-28 12:06:21 -04:00
Brown
c022d49b1a Allow coercion from templated param to false 2019-03-28 10:19:02 -04:00
Brown
b7472c62c2 Add ability to specify an http endpoint if desired 2019-03-27 17:01:05 -04:00
Matthew Brown
ba603acd7b Send build information to remote server 2019-03-23 12:49:37 -04:00
Matthew Brown
9d4ebe6b6b Add plugin hook for post-analysis stuff 2019-03-23 12:47:46 -04:00
Brown
85f34f2aca Add defining class and increas string length 2019-03-12 12:58:04 -04:00
Brown
5beb26659e Add special type for SQL select strings for plugins to consume 2019-03-07 14:56:18 -05:00
Tyson Andre
6f7295ed13 Remove unused use statements 2019-03-03 22:22:36 -05:00
Matthew Brown
317f790bde
New plugin hooks (#1405)
* Add a bunch of new hooks

* Add more integrations

* Add some broken tests

* Add more things

* Fix remaining interfaces

* Suppress proper issue

* UndefinedMethod should not stop analysis

* Add handlers for two custom method return types
2019-03-01 08:57:10 -05:00
Brown
815bf845dc Improve handling of method/function return types 2019-02-27 17:06:44 -05:00
Bruce Weirdan
24a71be425 Added Hook\AfterCodebasePopulatedInterface 2019-02-26 01:16:22 -05:00
Bruce Weirdan
8408effe57 Dropped unused uses 2019-02-17 13:17:45 -05:00
Matthew Brown
2ef82d785f Improve signature of FunctionReturnTypeProvider to omit internal things 2019-02-16 15:29:54 -05:00
Matthew Brown
0739d017ac Use information from .phpstorm.meta.php files in stubs 2019-02-16 11:16:52 -05:00
Matthew Brown
d76459e138 Move to a PHPStan-like return type provider class model 2019-02-15 18:00:40 -05:00
Matthew Brown
6e585008f2 Fix #1183 - add hook for class analysis 2019-01-09 08:28:12 -05:00
Matthew Brown
1f3fab4cad Make sure method call return type is passed by ref 2018-11-22 00:40:22 -05:00
Brown
06974221df Change DependencyFinderVisitor name to ReflectorVisitor and update docs 2018-11-13 14:09:43 -05:00
Brown
0254322bed Migrate Codebase-namespaced and FileManipulation-namespaced classes to internals 2018-11-12 11:20:59 -05:00
Bruce Weirdan
a338e76ef6 Plugin interface segregation (#1076)
* Split Plugin into PluginApi\Hook\* interfaces

* dropped Psalm\Plugin

* updated docs

* s/PluginApi/Plugin/g
2018-11-12 11:20:59 -05:00