the-toster/psalm-fmt

Psalm wrapper that formats console output to fit PhpStorm source link pattern

0.0.3 2020-09-01 05:07 UTC

This package is auto-updated.

Last update: 2024-11-29 05:51:34 UTC


README

Build Status Psalm coverage

Psalm wrapper for PhpStorm

Add links to files into issues report
before:
before

after:
after

How it works

It just runs psalm --output-format=json and then turn into slightly modified console format, so PhpStorm can recognize issues filenames as links. It also passes additional arguments, so you can use it as vendor/bin/psalm-fmt file.php.

Features

  • respects -m, --monochrome, --show-snippet[=true] flags
  • pass back psalm exit code
  • bypass output if given --output-format is not console

Limitation | TODO

  • isn't suppress json output
  • isn't show stats and other details given by console format
  • provide formatter customisation

Installation

composer require --dev the-toster/psalm-fmt

Will create vendor/bin/psalm-fmt

Usage

vendor/bin/psalm-fmt