Skip to content

Commit e42684a

Browse files
xaloppmmoll
authored andcommitted
update contributing documentation
1 parent 31b2c48 commit e42684a

File tree

2 files changed

+34
-12
lines changed

2 files changed

+34
-12
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
## Setup
4+
5+
We do recommend the following setup:
6+
7+
* make sure that [Composer](https://getcomposer.org) is installed
8+
* clone the [PHP_CodeSniffer repository](https://github.com/squizlabs/PHP_CodeSniffer)
9+
* run `composer install` inside the `PHP_CodeSniffer` directory to install required dependencies
10+
* get the [Symfony Coding Standard](https://github.com/djoos/Symfony-coding-standard) and symlink, copy or move its `Symfony` subdirectory to `PHP_CodeSniffer/src/Standards/Symfony`
11+
* symlink, copy or clone this repository to `PHP_CodeSniffer/src/Standards/MO4`
12+
13+
git clone https://github.com/squizlabs/PHP_CodeSniffer.git
14+
cd PHP_CodeSniffer
15+
composer install
16+
cd src/Standards
17+
git clone https://github.com/djoos/Symfony-coding-standard.git Symfony
18+
mv Symfony/Symfony/* Symfony/
19+
git clone https://github.com/mayflower/mo4-coding-standard.git MO4
20+
21+
22+
## Coding Standard and Tests
23+
24+
If you contribute code, please make sure it conforms to the PHPCS coding standard and that the unit tests still pass.
25+
26+
1. To check the coding standard, run in the repository root of `PHP_CodeSniffer`:
27+
28+
./bin/phpcs --ignore='*/vendor/*' src/Standards/MO4
29+
30+
2. The unit-tests are run from within the `PHP_CodeSniffer` directory
31+
32+
./vendor/bin/phpunit --filter MO4
33+

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,7 @@ The MO4 Coding Standard is an extension of the [Symfony Coding Standard](http://
5252

5353
## Contributing
5454

55-
If you contribute code to these sniffs, please make sure it conforms to the PHPCS coding standard and that the unit tests still pass.
56-
57-
To check the coding standard, run in the repository root:
58-
59-
bin/phpcs --ignore='*/vendor/*'
60-
61-
The unit-tests are run from within the PHP_CodeSniffer directory
62-
63-
* clone the [CodeSniffer repository](https://github.com/squizlabs/PHP_CodeSniffer)
64-
* symlink, copy or clone the [Symfony Coding Standard](https://github.com/djoos/Symfony-coding-standard) and symlink, copy or move its `Symfony` subdirectory to `src/Standards/Symfony`
65-
* symlink, copy or clone this repository to `src/Standards/MO4`
66-
* from the CodeSniffer repository root run `phpunit --filter MO4`
55+
See [CONTRIBUTING.md](CONTRIBUTING.md) for information.
6756

6857
## Credit
6958

0 commit comments

Comments
 (0)