https://github.com/pressmodo/phpcs-config
Pressmodo custom PHPCS rules for WordPress projects.
https://github.com/pressmodo/phpcs-config
phpcs phpcs-config phpcs-standard pressmodo wordpress
Last synced: 9 months ago
JSON representation
Pressmodo custom PHPCS rules for WordPress projects.
- Host: GitHub
- URL: https://github.com/pressmodo/phpcs-config
- Owner: Pressmodo
- License: mit
- Created: 2019-02-25T16:04:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T17:50:57.000Z (about 7 years ago)
- Last Synced: 2025-04-07T03:35:01.722Z (about 1 year ago)
- Topics: phpcs, phpcs-config, phpcs-standard, pressmodo, wordpress
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Pressmodo PHPCS Configuration
Composer library to provide drop in installation and configuration of [WPCS](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) and [PHPCompatibilityWP](https://github.com/PHPCompatibility/PHPCompatibilityWP), setting reasonable defaults for WordPress development with nearly zero configuration.
## Installation
Install the library via Composer:
```bash
$ composer require --dev pressmodo/phpcs-config:dev-master
```
That's it!
## Usage
Lint your PHP files with the following command:
```bash
$ ./vendor/bin/phpcs .
```
If relying on Composer, edited the `composer.json` file by adding the following:
```json
"scripts": {
"lint": "phpcs .",
"lint-fix": "phpcbf ."
}
```
Then lint via:
```bash
$ composer run lint
```
### IDE Integration
Some IDE integrations of PHPCS fail to register the `Pressmodo-Default` ruleset. In order to rectify this, place `.phpcs.xml.dist` at your project root:
```xml
```