1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

53 Commits

Author SHA1 Message Date
kolja
215f1c381e Moved code to get memory_limit in bytes to command functions since that is where it is used. 2020-02-24 21:19:16 -05:00
Matthew Brown
a2c2a55ae6 Update documentation 2020-02-17 22:06:28 -05:00
Barney Laurance
4a4c0f1362 Clarify documentation of --diff and --diff-methods (#2680)
* Clarify documentation of --diff and --diff-methods

* Save Psalm cache in CircleCI
2020-01-25 10:50:11 -05:00
Matthew Brown
fa65ab8168 Add support for Github Actions output
Fixes #2678
2020-01-23 07:14:48 -05:00
Brown
7482b9e56f Emit all stubs discovered by Psalm during analysis
Fixes #827
2020-01-08 17:23:40 -05:00
Matthew Brown
d7b99148be Add support for JUnit report type
Fixes #2485
2019-12-19 20:18:09 +00:00
Jon Ursenbach
284565811c feat: organizing the --help screen (#2417) 2019-12-04 16:16:03 -05:00
Matthew Brown
016fd58547 Add command in help 2019-12-03 02:18:44 -05:00
Brown
821f3528d2 Fix #701 - indicate issues fixable with Psalter 2019-12-02 15:24:01 -05:00
Tyson Andre
6bc152e2da Use the long progress bar for CI logs (#2364) 2019-11-22 08:56:18 -05:00
Brown
f8f8b633b1 Suppress a bunch of PossiblyUndefinedArrayOffset issues 2019-10-01 15:44:43 -04: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
Brown
9afdff5017 Remove newline 2019-09-09 17:28:32 -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
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -04:00
Matthew Brown
2a5e0d8f39 Fix #1444 - track unused suppressions 2019-08-18 14:27:50 -04:00
Brown
73b1571bd7 Remove php version from default baseline generation 2019-07-11 10:41:44 -04:00
Barney Laurance
ea83068deb Allow resolving directories from config file location (continued) (#1910)
* Extract function getPsalmHelpText() from psalm.php

* Extract initialiseConfig from psalm.php

* Add -c as valid short option for psalter and psalm-refactor

* Use initialiseConfig in psalter, psalm-refactor and psalm-language-server as well as psalm

* Rely on psalm --alter resolving directory from config file in test

* Remove erronous condition for config file path

This code was based on me wrongly thinking that the config file location
was seprated from the argument name with a space instead of an equals
sign

* Use config dir as current dir in psalm and psalm-refactor, as with psalter and psalm-language-server

* Remove redundant duplicated code

* Refactor: move calls to \Psalm\Config::setComposerClassLoader inside initialiseConfig

* PHPCS fix

* Extract function get_path_to_config from command scripts

* Refactor - extract functions from \Psalm\Config::loadFromXML

* Refactor - reduce verbosity of config loading code

* Allow running e2e tests on windows

* Fix testCompactReport on Windows

* convert line endings to make testCompactReport pass on Windows
2019-07-07 08:55:53 -04:00
Barney Laurance
94f934627c Work in progress - resolve directories from config file location (#1904)
* Add resolveFromConfigFile config option

Treats all paths as relative to the location of the config file, not
the current working directory of the process.

This commit just changes psalm, further commits will be needed to
apply the change to psalter and the LSP server.

* Copy asset xml files into project root for testing, delete during teardown

Needed since paths are now resolved relative to the position of the
file.

Not sure why I only saw a test failre for 1.xml - would have expected it
for all eight files.

* Fix following rebase

* Move psalm --init handly code above working directory setting code

If there's no psalm.xml yet we can't use the location of psalm.xml to
set our working directory

* Move Psalm version output code above working directory resolution

Working directory doesn't need to be known to output version constant

* Rely on new config file based working directory in end to end test

* Dont use rely on config dir for --alter - not currently working

* Fix code style error

* Add failing test for supporting config without `resolveFromConfigFile="true"`

* Don't treat config directory as a path to check

* Document resolveFromConfigFile setting
2019-07-06 12:21:39 -04:00
Matthew Brown
40a5194cce Fix #1907 - exit expicitly when composer.json is invalid 2019-07-06 12:20:20 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Tyson Andre
791b30a6d8 Fix redundant casts/conditions in psalm (#1874)
This includes a check for array_map that was accidentally an assignment
2019-06-29 12:32:44 -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
Matthew Brown
2439a9f6a0 Allow instance method renaming, too 2019-06-02 12:02:39 -04:00
Matthew Brown
2b0a17c1c8 Add simple tool to move static methods 2019-06-02 01:10:50 -04:00
Bruce Weirdan
1b0158ad72 Fixed vimeo/psalm#1714 (#1715)
* Fixed vimeo/psalm#1714

Moved `isAbsolutePath()` into a functions file (`src/functions.php`)
that is now automatically loaded by composer autoload.

/cc: @jwage

* Dropped redundant bootstrap
2019-06-01 08:26:22 -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
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
Jonathan H. Wage
ecb7a6c069 Add support for absolute plugin paths. 2019-05-05 16:44:36 -04:00
Matthew Brown
79ae72d553 Fix #935 - allow Phar to run without composer files 2019-04-20 16:37:27 -04:00
Brown
50035334d4 Add more descriptive message for autoloader error 2019-04-18 12:12:43 -04:00
Brown
c1434ee212 Add --language-server support 2019-03-27 11:55:10 -04:00
Matthew Brown
ff4ee6c9df Use more defensive techniques to warn against missing autoloader
Ref #1479
2019-03-18 07:47:57 -04:00
Matthew Brown
bcc062cfc5 Fix #1094 - ignore phar path on windows 2018-11-27 00:46:19 -05:00
Matthew Brown
a32273b2b8 Allow use of Psalm without composer
Fixes #935
2018-08-09 00:03:32 -04:00
Matthew Brown
97290350dc Remove unnecessary key var 2018-06-17 09:35:08 -04:00
Matthew Brown
09082ddf52 Fix #695 - fix PHP parser cache version 2018-04-24 07:07:04 -04:00
Matt Brown
87be0b5863 Change die($message) to explicit exit(1) 2018-04-17 11:48:29 -04:00
Bruce Weirdan
12488ea8ed dropped commented out code, added file_exists() checks for stubs 2018-03-08 19:14:06 -05:00
Bruce Weirdan
716ed8b2f9 cleanup: Phar is always available 2018-03-08 19:14:06 -05:00
Bruce Weirdan
32884774e4 build psalm.phar using humbug/box 2018-03-08 19:14:06 -05:00
Matthew Brown
b90a58533b Fix tests and return types 2018-03-03 15:25:35 -05:00
Matthew Brown
ade9e03c85 Use composer autoloader for class resolution where possible 2018-03-03 15:19:05 -05:00
Matthew Brown
63b473966d Fix phpcs warning 2018-02-25 12:14:35 -05:00
Matt Brown
1a2d13ae32 Ignore falsable issues from core functions 2018-01-25 13:07:36 -05:00
Matt Brown
d67f1e3c28 Fix #252 - allow custom vendor directory 2018-01-25 11:32:54 -05:00
Matthew Brown
516e7105c1 Add space 2018-01-18 08:35:45 -05:00
medains
76c13fa27f Ensure static analysis picks up the correct type of bool 2018-01-18 08:35:45 -05:00