You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run with the options --report=report.json --output-format=console and save both the report file and the stdout.
Cons:
Code issues printed to stdout are redundant.
Psalm needs write access to the file system to write the report into a separate file instead of stdout. This may create problems, for example if you run Psalm in a Docker container.
Possible solution
Write the statistics to stderr instead of stdout regardless of the --output-format. The stdout should be a place for code issue only (whether human-readable or machine-readable). The stderr may be a place for log, progress, statistics, etc.
The text was updated successfully, but these errors were encountered:
Problem description
Psalm can output some interesting statistics like:
and even more statistics with the options
--stats
and/or--debug-performance
.But:
--output-format
isconsole
orphpstorm
.So, in the case when one needs to have the report in other format (e.g.
--output-format=json
), he/she cannot get the statistics.Root cause
psalm/src/Psalm/IssueBuffer.php
Lines 708 to 711 in 5370492
Workaround
Run with the options
--report=report.json --output-format=console
and save both the report file and the stdout.Cons:
Possible solution
Write the statistics to stderr instead of stdout regardless of the
--output-format
. The stdout should be a place for code issue only (whether human-readable or machine-readable). The stderr may be a place for log, progress, statistics, etc.The text was updated successfully, but these errors were encountered: