tldr/pages/common/phan.md

33 lines
789 B
Markdown
Raw Normal View History

2020-10-02 12:01:32 +01:00
# phan
> A static analysis tool for PHP.
> More information: <https://github.com/phan/phan>.
- Generate a `.phan/config.php` in the current directory:
`phan --init`
- Generate a Phan configuration file using a specific level (1 being strictest to 5 being the least strict):
`phan --init --init-level {{level}}`
2022-06-27 11:23:12 +01:00
- Analyze the current directory:
2020-10-02 12:01:32 +01:00
`phan`
2022-06-27 11:23:12 +01:00
- Analyze one or more directories:
2020-10-02 12:01:32 +01:00
`phan --directory {{path/to/directory}} --directory {{path/to/another_directory}}`
- Specify a configuration file (defaults to `.phan/config.php`):
2020-10-02 12:01:32 +01:00
`phan --config-file {{path/to/config.php}}`
- Specify the output mode:
`phan --output-mode {{text|verbose|json|csv|codeclimate|checkstyle|pylint|html}}`
- Specify the number of parallel processes:
`phan --processes {{number_of_processes}}`