PHPackages                             grnrbt/php-lint - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. grnrbt/php-lint

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

grnrbt/php-lint
===============

greenrabbit lint config

39PHP

Since Feb 27Pushed 9y ago3 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHP-Lint
========

[](#php-lint)

PHP-Lint is simplified linter solution for php, based on [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).

Currently it's support only as HG hook, GIT hook will come soon.

Current rule set is in progress. It consist of [PSR1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), PEAR, [PHPCompatibility](https://github.com/wimg/PHPCompatibility), [Yii2 Coding Standard](https://github.com/yiisoft/yii2-coding-standards), some of Squiz and Generic rules.

Installation
------------

[](#installation)

Installation is realized by [Composer](https://getcomposer.org).

In the console write:

```
composer require --dev grnrbt/php-lint "*"

```

or add following line in `require-dev` section of `composer.json` file.

```
"grnrbt/php-lint": "*"

```

Usage
-----

[](#usage)

**HG hook**
Checks only staged files in repository so it can be added in present repositories without problems with old files.

Add following code into `.hg/hgrc` file or HG-client settings:

```
[hooks]
pretxncommit.hglint = vendor/bin/lint

```

or on Windows:

```
[hooks]
pretxncommit.hglint = vendor\bin\lint.bat

```

To skip checking run commit from console with ENV param `NO_VERIFY=1`:

```
NO_VERIFY=1 hg ci -u  -m

```

**Manual run**
You can run linter with ruleset manually from console

```
$ ./vendor/bin/lint

```

It will check staged files or run CodeSniffer itself

```
$ ./vendor/bin/phpcs --extensions=php --standard=/vendor/grnrbt/php-lint/ruleset.xml

```

For checking choosen directory ``

**PHPStorm**
If you're using PhpStorm you can configure it to use CodeSniffer using Settings → Languages &amp; Frameworks → PHP → Code Sniffer.

Custom rules
------------

[](#custom-rules)

You can override standard rules by placing file `ruleset.xml` in root directory of your project. In that file you can include original file and add your own rules or disable rules, that was added in common ruleset.

```

    A custom coding standard

    */tests/*

```

Links
-----

[](#links)

- [Annotated ruleset.xml](https://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

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/0aad5993f7ca4dcfc0b12d62f37b3bd491731079bb85e41679f0f4f347b791b6?d=identicon)[Green Rabbit](/maintainers/Green%20Rabbit)

---

Top Contributors

[![Archy812](https://avatars.githubusercontent.com/u/3437249?v=4)](https://github.com/Archy812 "Archy812 (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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