1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/README.md

53 lines
2.2 KiB
Markdown
Raw Normal View History

2016-12-12 21:32:01 +01:00
<h1><a href="https://getpsalm.org"><img src="PsalmLogo.png" height="64" alt="logo" /></a></h1>
2016-07-18 22:46:44 +02:00
[![Packagist](https://img.shields.io/packagist/v/vimeo/psalm.svg)](https://packagist.org/packages/vimeo/psalm)
2018-01-23 23:25:42 +01:00
[![Packagist](https://img.shields.io/packagist/dt/vimeo/psalm.svg)](https://packagist.org/packages/vimeo/psalm)
2017-02-09 07:54:41 +01:00
[![Travis CI](https://img.shields.io/travis/vimeo/psalm/master.svg)](https://travis-ci.org/vimeo/psalm/branches)
[![Coverage Status](https://coveralls.io/repos/github/vimeo/psalm/badge.svg)](https://coveralls.io/github/vimeo/psalm)
2018-02-22 02:09:30 +01:00
Psalm is a static analysis tool for finding errors in PHP applications, built on top of [PHP Parser](https://github.com/nikic/php-parser).
2016-12-05 05:19:14 +01:00
2018-02-22 02:09:30 +01:00
It's able to find a [large number issues](https://github.com/vimeo/psalm/blob/master/docs/issues.md), but it can also be configured to only care about a small subset of those.
2016-11-11 20:19:31 +01:00
[Try a live demo](https://getpsalm.org/), or install it in your project by following the Quickstart Guide below.
## Psalm documentation
2018-03-18 14:08:32 +01:00
All the documentation for Psalm is found in the docs folder - [the index is located here](https://github.com/vimeo/psalm/blob/master/docs/index.md),
2016-11-21 21:15:23 +01:00
## Quickstart Guide
Install via [Composer](https://getcomposer.org/):
```bash
composer require --dev vimeo/psalm
2016-11-21 21:15:23 +01:00
```
2017-02-13 06:16:22 +01:00
Add a config:
2016-11-21 21:15:23 +01:00
```bash
2017-02-13 06:14:20 +01:00
./vendor/bin/psalm --init
2016-11-21 21:15:23 +01:00
```
2017-02-13 06:14:20 +01:00
Then run Psalm:
2016-11-21 21:15:23 +01:00
```bash
./vendor/bin/psalm
```
2018-02-22 02:09:30 +01:00
The config created above will show you all issues in your code, but will emit `INFO` issues (as opposed to `ERROR`) for certain common trivial code problems. If you want a more lenient config you can specify the level with
2017-02-13 06:16:22 +01:00
```bash
./vendor/bin/psalm --init [source_dir] [level]
```
2018-02-22 02:09:30 +01:00
You can also [learn how to suppress certain issues](https://github.com/vimeo/psalm/blob/master/docs/dealing_with_code_issues.md).
2017-01-16 23:20:07 +01:00
## How Psalm Works
A basic rundown of Psalms internals can be found in [docs/how_psalm_works.md](https://github.com/vimeo/psalm/blob/master/docs/how_psalm_works.md).
2017-01-16 23:20:07 +01:00
## Acknowledgements
The engineering team [@vimeo](https://github.com/vimeo) for encouragement and patience, especially [@nbeliard](https://github.com/nbeliard), [@erunion](https://github.com/erunion) and [@nickyr](https://github.com/nickyr).