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

169 Commits

Author SHA1 Message Date
Matthew Lewinski
ac0a9d1514 Add a 'sonarqube' report type (#1808)
This JSON report is suitable for import into either SonarCloud or
SonarQube as Generic Issue Data (also known as an External Issue
Report).

https://docs.sonarqube.org/latest/analysis/generic-issue/
2019-06-17 21:17:09 -04:00
Matthew Brown
b5cbc84351 Fix #1617 - add option to only show errors in reports 2019-06-09 12:37:28 -04:00
Brown
9573429f1e Always disable uopz
Ref #1741
2019-06-06 10:36:26 -04:00
Matthew Brown
90b160aece Allow extensions to be disabled during --init
Ref #1741
2019-06-06 08:42:44 -04:00
Brown
ae8ccdbcd7 Add add info notification to progress 2019-06-03 11:20:42 -04:00
Matthew Brown
2b0a17c1c8 Add simple tool to move static methods 2019-06-02 01:10:50 -04:00
Brown
6f5da23840 Remove redundant check 2019-05-31 13:22:40 -04:00
Brown
ad18eecc13 Disable progressbar when CI is detected 2019-05-31 13:12:22 -04:00
Brown
7c069a9ba7 Suppress errors when baseline is enabled 2019-05-30 10:42:16 -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
Brown
335b04186b Add autodiscovery of --init folders based on composer.json 2019-05-09 19:19:33 -04:00
Brown
111abf82da Fix #1616 - allow Psalm to output checkstyle format 2019-05-08 14:26:52 -04:00
Brown
2fe5a72ab7 Fix #1586 - allow use of --find-unused-code as alternative to --find-dead-code 2019-04-30 13:23:18 -04:00
Matthew Brown
cd74e227c1 Remove var_dump 2019-04-21 11:42:43 -04:00
Matthew Brown
d68e501bfa Fix #1528 - double check for missing dependency 2019-04-21 11:30:50 -04:00
Brown
fea9faaec5 Allow psalter to be used in multithreaded mode 2019-04-17 13:15:06 -04:00
Brown
4abdc1503f Prevent --update-baseline from running in --diff mode
Fixes #1566
2019-04-16 18:16:46 -04:00
Brown
ff14f671b1 Add hopefully-more-portable method for evaluating method/property usage 2019-04-16 16:07:48 -04:00
Matthew Brown
c297b91d6f Fix possibly null property 2019-04-14 13:04:25 -04:00
Matthew Brown
d145f17782 Fix #1548 - allow parallel execution with --find-dead-code 2019-04-13 15:38:09 -04:00
Brown
26e2de93c7 Prepare to enable paralellised use of --find-dead-code
References #1548
2019-04-12 18:28:07 -04:00
Matthew Brown
326249e13b spirit => shepherd 2019-03-31 14:02:30 -04:00
Tyson Andre
31e1804ff9 Fix typo in --help ("is base" -> "is based") 2019-03-28 18:02:25 -04:00
Brown
c1434ee212 Add --language-server support 2019-03-27 11:55:10 -04:00
Matthew Brown
ba603acd7b Send build information to remote server 2019-03-23 12:49:37 -04:00
Matthew Brown
94dadee12a Use relative path for config.xsd
Fixes #1472
2019-03-17 15:02:51 -04:00
Brown
bd372e93af Add config flags for findUnusedVariables and findUnusedCode 2019-03-05 15:45:09 -05:00
Roland Franssen
efc0beab6c fix --help end of line 2019-03-04 07:25:58 -05:00
Matthew Brown
9bfabab976 Add support for psalter in Phar 2019-03-03 22:59:00 -05:00
Matthew Brown
674657a51d Fix 7.0-incompatible logic 2019-02-24 01:47:53 -05:00
Matthew Brown
3ad1abece4 Add generation of json artifacts 2019-02-24 01:33:25 -05:00
Bruce Weirdan
faae9fda3b Added option to force dead code detection
Previously Psalm would only check class references when there were no
paths passed on the command line. Now it's possible to force this check
even when paths are specified, with `--find-dead-code=always`.

`--find-dead-code` without a value (or with any value apart from `always`)
will continue to work the same way it did before.
2019-02-18 09:34:28 -05:00
Matthew Brown
574a5530ee Use $baselineFile for current baseline 2019-02-09 11:20:48 -05:00
Maria Luiza Soares
5bd16c686f Show total fixed errors when updating baseline 2019-02-09 11:20:48 -05:00
Matthew Brown
17541b415f Fix #1191 - allow Psalm to check against different versions of PHP 2019-02-07 12:25:57 -05:00
Brown
51c6621925 Add property lookup 2019-01-22 11:10:37 -05:00
Andrii Dembitskyi
dfedf70d5d 🐛 Fix --plugin option handling for psalm 2019-01-08 18:44:43 -05:00
Dave Liddament
5103dfd680 FIX update psalm help text to show you can also generate a report with a .emacs file ending 2018-12-18 17:24:28 -05:00
Jon Ursenbach
c6a8b53a4d Refactoring output formats and creating a new "compact" format.
The new compact format generates your report within a table
structure that is similar to PHPCS.

Resolves #967
2018-12-09 17:34:47 -05:00
Matthew Brown
37dedee7b6 Fix memory leak issues and disable garbage collection 2018-11-18 11:39:14 -05:00
Brown
f10714e6f8 Add a --no-reflection-cache option for plugin use 2018-11-12 11:20:59 -05:00
Matthew Brown
4d79b61e93 Change _checker to _analyzer 2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Erik Booij
f05d10ebe4 Automatically add reference to baseline to config file 2018-11-04 19:28:12 -05:00
Brown
f017599b3f Fix how InvalidDocblock is treated
Fixes #1051 (hopefully)
2018-11-01 17:03:08 -04:00
Matthew Brown
9c1f15526d Remove erroneous =PATH 2018-11-01 11:16:08 -04:00
Erik Booij
635410ea41 Introduce issue baseline with --set-baseline and --with-baseline 2018-11-01 11:16:08 -04:00
Dave Liddament
14b99203d5 FIX #1047
FIx for issue [CLI -i flag not being processed correctly](https://github.com/vimeo/psalm/issues/1047)
2018-10-31 22:27:21 -04:00
Brown
e286089eaa Add onchange events and symbol lookup with disabled completion 2018-10-26 16:17:15 -04:00
Brown
4da1fd0e40 Change psalm --server to psalm-language-server 2018-10-18 14:34:46 -04:00
Brown
54fdda651b Add server mode support with error reporting only 2018-10-17 15:54:31 -04:00
Brown
5a484901cd Improve the way that files are reloaded (server only) 2018-10-16 15:59:11 -04:00
Brown
13cc3b4751 Improve file hash reloading 2018-10-15 11:34:51 -04:00
Brown
ccc92d7709 Fix microtime types 2018-10-10 16:05:06 -04:00
Matthew Brown
afebefba19 Switch from --cache-results to --diff-methods flag 2018-10-07 00:42:25 -04:00
Brown
d0bd10d143 Improve provider architecture, upping test coverage 2018-09-30 11:34:51 -04:00
Brown
af163c0f53 Add better timing and profiling for autoload scanning 2018-09-25 16:35:23 -04:00
Matt Brown
956a7c749b Improve handling of array_search and strstr, and restrict ini_set types 2018-08-29 13:58:07 -04:00
Bruce Weirdan
3b3863f3a8 Scan entire file/dir list at once (#944)
fixes vimeo/psalm#943
2018-08-15 11:57:40 -04:00
Matthew Brown
a32273b2b8 Allow use of Psalm without composer
Fixes #935
2018-08-09 00:03:32 -04:00
Matthew Brown
d3fc9a51e0 Improve callmap with PHPStan’s additions
cc @TysonAndre
2018-07-22 19:15:40 -04:00
Tyson Andre
ef1c1995a3 Split up CLI options into individual lines, and sort them (#902)
No CLI options were added or removed.

This has the following benefits:

- It makes it easier to track history of CLI flags in git
- It avoids merge conflicts if multiple PRs add CLI options
- It makes maintaining patches/forks easier.
2018-07-20 07:07:41 -04:00
Matt Brown
b831baee51 Make disabled extensions configurable 2018-07-17 16:54:34 -04:00
Matt Brown
6a06f06044 Improve API for disabling extensions and disable apc as well 2018-07-17 16:40:03 -04:00
Matt Brown
73aa0df08a Restart without grpc if running in threaded mode 2018-07-17 14:08:40 -04:00
Matthew Brown
a7cb4664aa Fix #542 - warn about incorrect psalm args 2018-07-15 18:43:06 -04:00
SignpostMarv
76a3fbbdf0 memory_limit specified as int to resolve windows-related issue #842 without requiring --use-ini-defaults argument to be passed (#860) 2018-07-03 17:22:04 -04:00
Matthew Brown
16e270f0ee Improve loading of stub file and autoload file information
Ref #849
2018-06-30 15:29:37 -04:00
Matt Brown
4a975883b4 Add --use-ini-defaults arg to prevent Psalm overriding memory_limit and more
Fixes #842
2018-06-27 10:40:02 -04:00
Matt Brown
e53783f8f4 Add an option to hide code snippets 2018-06-04 10:19:20 -04:00
Matt Brown
37620ce2e5 Bump memory limit 2018-04-25 10:33:15 -04:00
Gabriel Ostrolucký
2295756793 fix xsd path replacement in --init 2018-04-21 18:55:42 -04:00
Matt Brown
a25a989c12 Prepare v2 dev release 2018-04-19 17:29:07 -04:00
Matthew Brown
2b34c1d315 Add extra level 8 containing PHP autoload landmines 2018-04-19 01:03:28 -04:00
Matt Brown
4c84f88668 Bump allowable config 2018-04-18 15:38:24 -04:00
Matt Brown
aa3ea9c14c Add a 7th level with even more permissive checks 2018-04-18 15:31:00 -04:00
Matt Brown
87be0b5863 Change die($message) to explicit exit(1) 2018-04-17 11:48:29 -04:00
Matthew Brown
75e59f29ea Check as many autoloaded files as possible
and ignore reflected function docblocks - fixes #629
2018-03-30 20:03:56 -04:00
Matthew Brown
871a91c850 Add debug-by-line option 2018-03-26 09:08:55 -04:00
Matthew Brown
fc20b9b63f Improve init mechanism for different roots
Fixes #601
2018-03-18 19:16:35 -04:00
Matthew Brown
a668cfd78b Add schema locations to generated XML
Fixes #583
2018-03-17 22:33:25 -04:00
Matt Brown
f806e16c10 Fix #516 - never show issues when finding references 2018-03-16 11:15:07 -04:00
Bruce Weirdan
e571c18299 updated xdebug-handler call to match new api 2018-03-08 16:42:53 -05:00
Bruce Weirdan
9a27583253 replace composer/composer with composer/xdebug-handler
Fixes vimeo/psalm#349

Note: there's no stable release at the moment, so it's using dev-master
for now.
2018-03-08 16:42:53 -05:00
Matt Brown
88e0a65f18 Remove Psalm --self-check option, because it’s dumb 2018-03-05 10:31:07 -05:00
Matthew Brown
ade9e03c85 Use composer autoloader for class resolution where possible 2018-03-03 15:19:05 -05:00
Matt Brown
e8b4559a6b Support level 6 and fix docs 2018-03-02 11:09:55 -05:00
Matthew Brown
2cec81ebfe
Fix #537 - misleading --init documentation 2018-03-02 10:58:12 -05:00
Matthew Brown
63b473966d Fix phpcs warning 2018-02-25 12:14:35 -05:00
Matthew Brown
42965bff65 Bust Psalm statements cache when upgrading Psalm version 2018-02-25 11:35:43 -05:00
Matt Brown
39cdd00094 Add extra level for starter configs 2018-02-22 12:25:05 -05:00
Matthew Brown
d10212b393 Fix perpetual diff builds 2018-02-19 23:36:36 -05:00
Tyson Andre
cdcec69536 Support the pylint output format
This is a compact output format that is easy to write scripts that parse.
(And errors fit on a single line)

- E.g. jenkins violation plugin works reliably with pylint.

The multi-line details are deliberately omitted.
An application can output 'console' to stdout and to
a pylint file at the same time.

Files with the extension .pylint will use this format.

Document the emacs and pylint output formats in `psalm --help`

An optional followup task would be to create unique issue codes,
I don't have any use cases for that.
2018-02-19 22:35:48 -05:00
Matthew Brown
634375ae94 Make igbinary the default serializer
Fix #484 and fix #527
2018-02-19 11:14:07 -05:00
Matthew Brown
81fd016120 Fix #193 - allow caching of storages 2018-02-19 00:27:39 -05:00
Matthew Brown
61b13b68cf Fix #376 - support turkish lowercase 2018-02-17 22:11:42 -05:00
Matthew Brown
108ca54867 Fix #516 - make sure --find-references-to doesn’t output missing references 2018-02-17 17:45:30 -05:00
Matthew Brown
078becb0b7 Fix cache clearing 2018-02-07 20:15:56 -05:00