PHPackages                             tengattack/phplint - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. tengattack/phplint

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

tengattack/phplint
==================

A configurable linter tool for PHP.

v0.3.0(1y ago)0881[26 issues](https://github.com/tengattack/phplint/issues)MITPHPPHP &gt;=7.0CI failing

Since Oct 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tengattack/phplint)[ Packagist](https://packagist.org/packages/tengattack/phplint)[ Docs](https://github.com/tengattack/phplint)[ RSS](/packages/tengattack-phplint/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

PHPLint
=======

[](#phplint)

A configurable linter tool for PHP.

Introduction
------------

[](#introduction)

### Dependencies

[](#dependencies)

- [htmllint-cli](https://github.com/htmllint/htmllint-cli)
- [stylelint](https://github.com/stylelint/stylelint)
- [scss-lint](https://github.com/brigade/scss-lint) (deprecated)

### Installation

[](#installation)

```
$ composer global require tengattack/phplint
$ # htmllint is used by rule `html` (it has to be latest)
$ npm i -g htmllint/htmllint-cli
$ # stylelint is used by rule `html`
$ npm i -g stylelint
$ # scss-lint is used by rule `html` (deprecated)
$ gem install scss_lint
```

### Run

[](#run)

```
$ export PATH=$PATH:~/.composer/vendor/bin
$ phplint /path/to/phpfile
```

### Configuration

[](#configuration)

If no configuration file is specified, it will first read the file `.phplint.yml` on current working directory as configuration, and if still not exists it will use the default configuration.

You can configure it as you want base on this file: [`.phplint.yml`](./.phplint.yml).

### Example

[](#example)

A php file `test.php` with following content:

```
