Skip to content

Commit

Permalink
Added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
javorszky committed Dec 5, 2017
1 parent 03779be commit 394d2f5
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# PHP Composter PHPCS WPCS

### Check your PHP source code for compliance with WordPress coding standards before committing.

This Composer package will start to check your PHP files upon each commit to make sure they comply to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/).

This is a [PHP Composter](https://github.com/php-composter/php-composter) Action.

Uses the wonderful [PHP CodeSniffer Project](https://github.com/squizlabs/PHP_CodeSniffer).

## Table Of Contents

* [Installation](#installation)
* [Basic Usage](#basic-usage)
* [Contributing](#contributing)

## Installation

Add the repository's URL as a repository to the `composer.json` file:
```
"repositories": [
{
"type": "vcs",
"url": "https://github.com/php-composter/php-composter-phpcs-wpcs"
}
],
```

Then j add as a development requirement to your `composer.json`, and it should work automagically:

```BASH
composer require --dev php-composter/php-composter-phpcs-wpcs
```

## Basic Usage

It should just work when you `git commit`.

## Internals

By default of the 5 different WordPress coding standards (`WordPress-VIP`, `WordPress`, `WordPress-Extra`, `WordPress-Docs` and `WordPress-Core`), this one uses the WordPress-Extra.

If you need to change it, currently you need to edit the Sniff file. Contributions on how to make this dynamic are welcome (.env file, different sniffs for each and choosing the appropriate hooks).

## Contributing

All feedback / bug reports / pull requests are welcome.

0 comments on commit 394d2f5

Please sign in to comment.