https://github.com/tengattack/phplint
A configurable linter tool for PHP.
https://github.com/tengattack/phplint
Last synced: 5 months ago
JSON representation
A configurable linter tool for PHP.
- Host: GitHub
- URL: https://github.com/tengattack/phplint
- Owner: tengattack
- License: mit
- Created: 2017-11-24T16:29:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-10T15:35:33.000Z (almost 2 years ago)
- Last Synced: 2025-07-19T16:44:10.767Z (11 months ago)
- Language: PHP
- Size: 115 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHPLint
A configurable linter tool for PHP.
## Introduction
### 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
```sh
$ 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
```sh
$ export PATH=$PATH:~/.composer/vendor/bin
$ phplint /path/to/phpfile
```
### 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
A php file `test.php` with following content:
```php