dprevite / lint
Lint scans your code for PHP syntax errors.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 54 816
Dependents: 7
Suggesters: 0
Security: 0
Stars: 15
Watchers: 4
Forks: 4
Open Issues: 0
Requires
- php: >=5.1.2
This package is not auto-updated.
Last update: 2024-05-07 04:09:15 UTC
README
A command line tool to lint your PHP code for syntax errors. Run it from the command line or from your build script.
Usage
usage: lint [-qb] [path]
options:
-q, --quiet: disable verbose output
-b, --blame: display git blame along with error messages
--exclude: comma separated list of folder patterns to exclude
-h, --help: display this help screen
Examples
Find who caused a syntax error: (git is required)
$ lint -b ../filename.php
Linting files against PHP 7.0.6
E
1 files checked, 1 errors.
PHP Parse error: syntax error, unexpected ';' in filename.php on line 5
Caused by Dan Previte <dprevite@example.com>
Check files, but ignore certain patterns to speed up the test:
$ lint --exclude=*views*
Linting files against PHP 7.0.6
............................................................
............................................................
................................................E...........
180 files checked, 1 errors.
PHP Parse error: syntax error, unexpected ';' in filename.php on line 26
Caused by Dan Previte <dprevite@example.com>
Install
Composer
composer require dprevite/lint
One Line Installer
wget https://raw.githubusercontent.com/dprevite/lint/master/scripts/lint && sudo mv lint /usr/local/bin/lint && sudo chmod 0755 /usr/local/bin/lint