tldr/pages/common/psalm.md

33 lines
600 B
Markdown
Raw Normal View History

2021-02-05 16:54:29 +00:00
# psalm
> A static analysis tool for finding errors in PHP applications.
> More information: <https://psalm.dev>.
- Generate a Psalm configuration:
`psalm --init`
2022-06-27 11:23:12 +01:00
- Analyze the current working directory:
2021-02-05 16:54:29 +00:00
`psalm`
2022-06-27 11:23:12 +01:00
- Analyze a specific directory or file:
2021-02-05 16:54:29 +00:00
`psalm {{path/to/file_or_directory}}`
2022-06-27 11:23:12 +01:00
- Analyze a project with a specific configuration file:
2021-02-05 16:54:29 +00:00
`psalm --config {{path/to/psalm.xml}}`
- Include informational findings in the output:
`psalm --show-info`
2022-06-27 11:23:12 +01:00
- Analyze a project and display statistics:
2021-02-05 16:54:29 +00:00
`psalm --stats`
2022-06-27 11:23:12 +01:00
- Analyze a project in parallel with 4 threads:
2021-02-05 16:54:29 +00:00
`psalm --threads {{4}}`