orklah
37a2f8a33d
unused use statements ( #4228 )
2020-09-22 01:10: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
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
Michel Hunziker
3538fe1955
Add configuration attribute to find unused @psalm-suppress ( #4041 )
2020-08-22 10:01:26 -04:00
feek
ec7876b8d6
feature: allow specifying memory limit ( #3947 )
2020-08-06 08:51:57 -04:00
Brown
6919e88423
Add performance logging under a --debug-performance flag
2020-07-30 15:30:19 -04:00
Brown
1e01e90fba
Namespace base files
2020-07-22 15:57:24 -04:00
Bruce Weirdan
931d35a703
Collect and scan files included by the autoloaders ( #3183 )
...
Refs vimeo/psalm#2861
2020-07-11 17:17:22 -04:00
Jon Ursenbach
6aca4c169e
feat: adding a runTaintAnalysis option into the config ( #3800 )
2020-07-10 13:22:03 -04:00
Tyson Andre
80e46cdb13
Support generating multiple report files ( #3776 )
...
E.g. `psalm --report=report.txt --report=report.pylint`.
It may be useful to have both a machine-readable and human readable
report, e.g. during taint analysis.
Previously, psalm would generate neither report if the report option was
repeated.
2020-07-08 15:08:17 -04:00
Brown
8404fa0750
Allow use of a different baseline
...
Ref #3672
2020-06-25 17:31:03 -04:00
Tyson Andre
bee10a2eb4
Add a --debug-emitted-issues flag ( #3637 )
...
And support --debug-by-line in psalter and psalm-refactor.
Those were previously not supported in getopt()
Fixes #3634
2020-06-22 18:16:47 -04:00
Brown
81e2745cf1
Add more options
2020-06-22 11:24:38 -04:00
Mark Sch
9aa46221f6
Use pretty print for JSON reporting. ( #3364 )
...
* Use pretty print for JSON reporting.
* Use pretty print for JSON reporting.
* Use pretty-print option on CLI for BC.
* Change static:: const to self::
Co-authored-by: Matthew Brown <github@muglug.com>
2020-05-18 08:40:20 -04:00
Markus Staab
3f3a2267ea
send php native warnings/errors/notices on stderr instead of stdout ( #3355 )
2020-05-12 20:44:09 -04:00
Brown
370ffa28e4
Fix #3117 - invalidate all caches when composer lockfile changes
2020-04-12 11:41:37 -04:00
Brown
ee50542b8f
Allow users to disable caching full files
2020-04-12 08:34:57 -04:00
Brown
4ef7cb50a5
Make Psalm faster when there aren’t any changes whatsoever
2020-03-31 22:22:34 -04:00
Brown
53612d0df6
Make --diff imply --diff-methods
2020-03-26 18:14:54 -04:00
Matthew Brown
7f9e6b893e
Increase processor consumption
2020-03-06 13:13:18 -05:00
Matthew Brown
d3f8e80c4a
Move reference map generation into separate file
2020-02-23 14:53:31 -05:00
Matthew Brown
320f3ec863
Update level config name
2020-02-17 22:43:13 -05:00
Matthew Brown
e48d2aef9c
Improve handling when threads cannot be used
2020-02-17 22:06:36 -05:00
Matthew Brown
ced092874a
Make config generation smarter
2020-02-17 22:05:58 -05:00
Matthew Brown
4e36f6caf5
Add explicit paths for included files
...
Fixes #2757
2020-02-07 09:06:15 -05:00
Philip Hofstetter
f6983fd883
allow setting php version from config or composer.json
...
if a composer.json is present and a PHP version requirement is
configured, we set the php version to the minimal PHP version that
satisfies the composer requirement.
Additionally, this adds a `phpVersion` attribute to the <psalm> tag. If
that's set, it takes precedence over what has been detected in
composer.json.
And finally, the --php-version command line flag continues to work and
takes precedence over the setting in the <psalm> tag
this fixes #2628
2020-01-30 08:48:53 -05:00
Brown
6b43c41ea3
Add file-defined functions
2020-01-08 17:40:50 -05:00
Brown
7482b9e56f
Emit all stubs discovered by Psalm during analysis
...
Fixes #827
2020-01-08 17:23:40 -05:00
Tyson Andre
b713066d32
Add an exception handler that prints full exception trace ( #2418 )
...
By default, php will only print the first few thousand bytes of the
exception, for an uncaught exception
(I think that's the default, and not just my configuration)
Instead, print all of the parts of the exception.
For #1083 (this PR does not cover set_error_handler)
2019-12-04 23:17:08 -05:00
Matthew Brown
f667dee4f5
More logging
2019-12-03 00:06:00 -05:00
Matthew Brown
260b73ce78
More logging
2019-12-02 23:59:01 -05:00
Brown
821f3528d2
Fix #701 - indicate issues fixable with Psalter
2019-12-02 15:24:01 -05:00
Matthew Brown
952484c64d
Add workaround for pcre.jit bug
2019-11-30 08:26:26 -05:00
Tyson Andre
6bc152e2da
Use the long progress bar for CI logs ( #2364 )
2019-11-22 08:56:18 -05:00
Matthew Brown
dade56e4e1
Fix #2354 - add option to match documentation
2019-11-17 14:49:28 -05:00
Joram Schrijver
e79a0cc8f0
Make --init use vendor-dir from composer.json ( #2313 )
2019-11-08 06:59:04 -05:00
Tyson Andre
f40fe86321
Properly warn when a short option is invalid. ( #2280 )
...
Previously, Psalm would not warn or exit - it would skip over the arg and
continue with analysis.
2019-10-29 08:55:34 +00:00
Bruce Weirdan
1d9a4cd53e
Show errors in progress bar when --ignore-baseline
is specified ( #2195 )
...
Refs vimeo/psalm#2190
2019-10-01 20:28:42 -04:00
Brown
d225374d6d
Fix #2156 - do better inference after isset
2019-10-01 19:31:08 -04:00
SignpostMarv
943705ce0e
load an xdebug stub when required, re: vimeo/psalm#2118 ( #2133 )
...
* load an xdebug stub when required, re: vimeo/psalm#2118
* correcting case sensitivity of XDebug to Xdebug
* only load the Xdebug stub when needed
2019-09-14 10:13:39 -04:00
Matthew Brown
deb36e8b27
Allow array_map alone when it uses a closure
2019-09-09 21:28:56 -04:00
Brown
28a954e623
Fix #2108 - don’t worry if config can’t be found when updating baseline
2019-09-09 17:03:23 -04:00
Brown
a6baa2d04c
Allow callables to be understood as pure
...
Fixes #2112
2019-09-09 12:11:04 -04:00
LeSuisse
0860727e64
Disable progress bar automatically when GitHub Actions is detected ( #2043 )
...
https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables
2019-08-22 15:28:05 -04:00
Matthew Brown
2a5e0d8f39
Fix #1444 - track unused suppressions
2019-08-18 14:27:50 -04:00
Michael Telgmann
5722512180
Fix setting of current_dir with 'root' command parameter ( #2001 )
2019-08-11 15:12:18 -04:00
Matthew Brown
b2c0993cdc
Add framework for taint analysis to Psalm
...
Ref #611
2019-08-04 10:37:36 -04:00
SignpostMarv
9ac78b5d10
add psalm config attribute re: #1804 ( #1936 )
...
* add psalm config attribute for controlling the default inclusion of php & php extension version info in the error baseline
* using method recommended by @bdsl in https://github.com/vimeo/psalm/pull/1936#discussion_r302727993
2019-07-12 10:31:12 -04:00