https://github.com/sublimelinter/sublimelinter-phpcs
SublimeLinter plugin for PHP, using phpcs.
https://github.com/sublimelinter/sublimelinter-phpcs
Last synced: 12 months ago
JSON representation
SublimeLinter plugin for PHP, using phpcs.
- Host: GitHub
- URL: https://github.com/sublimelinter/sublimelinter-phpcs
- Owner: SublimeLinter
- License: mit
- Created: 2013-12-18T15:24:52.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-09-01T13:17:34.000Z (over 1 year ago)
- Last Synced: 2025-02-24T04:11:26.283Z (12 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 72
- Watchers: 7
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SublimeLinter-phpcs
=========================
[](https://travis-ci.org/SublimeLinter/SublimeLinter-phpcs)
This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to [phpcs](https://github.com/squizlabs/PHP_CodeSniffer).
It will be used with files that have the "PHP", "HTML" and "HTML5" syntax.
## Installation
SublimeLinter must be installed in order to use this plugin.
Please use [Package Control](https://packagecontrol.io) to install the linter plugin.
Before using this plugin, ensure that `phpcs` is installed on your system, preferably somewhere in your PATH. To install `phpcs`, follow the instructions on https://github.com/squizlabs/PHP_CodeSniffer#installation.
## Settings
- SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html
- Linter settings: http://sublimelinter.com/en/latest/linter_settings.html
Use the `"args"` setting to configure the coding standard, and/or to display the sniff codes for each error:
```json
{
"args": [
"--standard=PEAR", // code standard
"-s" // display sniff codes
]
}
```
### Per-project Standards
You can set up your project settings to use a specific standard using the following:
```json
{
"settings": {
"SublimeLinter.linters.phpcs.args": "--standard='${folder}/phpcs.xml'"
}
}
```