mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
28 lines
858 B
Markdown
28 lines
858 B
Markdown
# Running Psalm
|
||
|
||
Once you've set up your config file, you can run Psalm from your project's root directory with
|
||
```bash
|
||
./vendor/bin/psalm
|
||
```
|
||
|
||
and Psalm will scan all files in the project referenced by `<projectFiles>`.
|
||
|
||
If you want to run on specific files, use
|
||
```bash
|
||
./vendor/bin/psalm file1.php [file2.php...]
|
||
```
|
||
|
||
## Command-line options
|
||
|
||
Run with `--help` to see a list of options that Psalm supports.
|
||
|
||
### Running Psalm faster
|
||
|
||
Psalm has a couple of command-line options that will result in faster builds:
|
||
|
||
- `--threads=[n]` to run Psalm’s analysis in a number of threads
|
||
- `--diff` which only checks files you’ve updated (and their dependents).
|
||
- `--diff-methods` which remembers Psalm’s output when scanning particular methods.
|
||
|
||
Running them together (e.g. `--threads=8 --diff --diff-methods`) will result in the fastest possible Psalm run.
|