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.

1.0.0 2014-03-20 03:52 UTC

This package is not auto-updated.

Last update: 2024-05-07 04:09:15 UTC


README

image

Latest Stable Version Total Downloads Latest Unstable Version License

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