PHPackages                             njoannidi/php-lint-bash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. njoannidi/php-lint-bash

ActiveLibrary

njoannidi/php-lint-bash
=======================

A short bash script to recursively lint PHP files with a nice output

624.9k3Shell

Since Oct 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/njoannidi/phpLintBash)[ Packagist](https://packagist.org/packages/njoannidi/php-lint-bash)[ RSS](/packages/njoannidi-php-lint-bash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

phpLintBash
===========

[](#phplintbash)

A quick bash script to recursively lint PHP files in a given directory. Nice to use as part of a testing stragegy for CI, or after doing an epic merge.

#### Returns:

[](#returns)

- Number of Files linted
- Number of Files passed
- Number of Files failed
- Offending errors
- Output on STDERR if any files fail linting
- Pass / Fail "Sanity check"
- Proper Exit codes

### Usage

[](#usage)

$ phpLint

- Will recursively lint all PHP files in default directory specified in script

$ phpLint \[directory\]

Lint all files recursively of specified directory

### Overview:

[](#overview)

- Will return a pass / fail
- Will only pass if all files pass
- Any errors will be output in addition to the file they were found in

### Scope:

[](#scope)

- This is a syntax checker. It will not run methods and check for correct returns
- It is not a static analysis tool. Code quality / specs are not enforced or searched for

### Caveats and Best Practice:

[](#caveats-and-best-practice)

- The nature of PHP's lint operation is to abort linting of a file once an error has been found, so...
- ***If a file has multiple errors you will only be notified of the first error***
- Run until you're error-free
- Although linting of the current file may have stopped due to a syntax error, linting of any remaining files in the queue will continue.

### Scripting / Deployment Usage:

[](#scripting--deployment-usage)

- This will return proper exit codes so it can be used for scripting deployments, etc.
- Pass
- Exit 0 (clean)
- Output on stdin
- Fail
- Exit 1
- Output on stderr

#### Requires:

[](#requires)

- PHP
- Bash

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d991a743cb7d3d3fc68bcef8231bf049eb9f16282143ffc19313b05ecb74338b?d=identicon)[njoannidi](/maintainers/njoannidi)

---

Top Contributors

[![njoannidi](https://avatars.githubusercontent.com/u/2028124?v=4)](https://github.com/njoannidi "njoannidi (7 commits)")

### Embed Badge

![Health badge](/badges/njoannidi-php-lint-bash/health.svg)

```
[![Health](https://phpackages.com/badges/njoannidi-php-lint-bash/health.svg)](https://phpackages.com/packages/njoannidi-php-lint-bash)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
