Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcaskill/phplint-bash
A bash script to recursively lint PHP files with a nice output.
https://github.com/mcaskill/phplint-bash
Last synced: 21 days ago
JSON representation
A bash script to recursively lint PHP files with a nice output.
- Host: GitHub
- URL: https://github.com/mcaskill/phplint-bash
- Owner: mcaskill
- License: mit
- Created: 2018-06-12T14:09:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T16:12:02.000Z (over 6 years ago)
- Last Synced: 2024-12-08T22:04:04.449Z (26 days ago)
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PHPLint
A bash wrapper around `php -l` to recursively perform syntax checks on PHP files with several processes at once.
## Installation
```console
$ composer require mcaskill/phplint-bash
```## Usage
```
Usage:
phplint [options] []...Arguments:
path One or more paths to files or directories to search for PHP files.Options:
-h, --help Display this help message and exit.
-V, --version Display version information and exit.
-p, --progress Display progress of the run.
-v, --verbose Increase verbosity of messages.
-q, --quiet Do not output any messages or progress.Exit Codes:
0: OK
1: Generic/unknown error code
2: PHP syntax error code
```Example:
```
$ phplint src/Http/Controllers/ src/Providers/RouteServiceProvider.php
```## License
This is licensed under MIT.
---
> `-l, --syntax-check`
>
> Provides a convenient way to perform only a syntax check on the given PHP code. On success, the text _No syntax errors detected in _ is written to standard output and the shell return code is `0`. On failure, the text _Errors parsing _ in addition to the internal parser error message is written to standard output and the shell return code is set to `-1`.
>
> This option won't find fatal errors (like undefined functions). Use the `-f` to test for fatal errors too.— [PHP command line options](http://php.net/manual/en/features.commandline.options.php)