14

It’s time to explain some things

 4 years ago
source link: https://psalm.dev/articles/its-time-to-explain-some-things
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

It’s time to explain some things

March 23, 2020 by Matt Brown - 1 minute read

For some of its users Psalm can seem mysterious – I often see commit messages along the lines of “make Psalm happy”, like it’s some sort of vengeful deity.

That’s obviously not great – Psalm aims to provide clarity, not sow confusion, so the latest version now includes links (in the tool‘s default output) that you can follow to understand why Psalm thinks something is problematic.

The links look like this:

ERROR: InvalidArgument - somefile.php:8:19 - Argument 1 of getAttribute expects string, int provided (see https://psalm.dev/004)

Clicking that link takes you to a dedicated help document that explains the issue in more detail, and provides potential fixes.

As with everything related to Psalm, all documentation is open-source. If you see something that could be improved, feel free to create a pull request!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK