Update CONTRIBUTING.md
This commit is contained in:
parent
cc57a9f347
commit
52b7bb50d0
|
@ -45,18 +45,18 @@ $ git checkout -b [name_of_your_new_branch]
|
||||||
|
|
||||||
4. Before you push your changes, make sure your code follows the `PSR12` coding standards , which is the standard Appwrite follows currently.
|
4. Before you push your changes, make sure your code follows the `PSR12` coding standards , which is the standard Appwrite follows currently.
|
||||||
You can easily do this by running the formatter
|
You can easily do this by running the formatter
|
||||||
```
|
```php
|
||||||
./vendor/bin/phpcbf --standard=PSR12 <your file path>
|
./vendor/bin/phpcbf --standard=PSR12 <your file path>
|
||||||
```
|
```
|
||||||
This will format the code according to the `PSR12` coding standard.
|
This will format the code according to the `PSR12` coding standard.
|
||||||
|
|
||||||
Now, go a step further by running the linter by the following command to manually fix the issues the formatter wasn't able to fix
|
Now, go a step further by running the linter by the following command to manually fix the issues the formatter wasn't able to fix
|
||||||
```
|
```php
|
||||||
./vendor/bin/phpcs --standard=PSR12 <your file path>
|
./vendor/bin/phpcs --standard=PSR12 <your file path>
|
||||||
```
|
```
|
||||||
This will give you a list of errors for you to rectify , if there is an instance you need more information on the errors being displayed you can pass in additional command line arguments. More list of available arguments can be found [here](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage). A very useful command line argument is `--report=diff`. This will give you the expected changes by the linter for easy fixing of formatting issues
|
This will give you a list of errors for you to rectify , if there is an instance you need more information on the errors being displayed you can pass in additional command line arguments. More list of available arguments can be found [here](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage). A very useful command line argument is `--report=diff`. This will give you the expected changes by the linter for easy fixing of formatting issues
|
||||||
|
|
||||||
```
|
```php
|
||||||
./vendor/bin/phpcs --standard=PSR12 --report=diff <your file path>
|
./vendor/bin/phpcs --standard=PSR12 --report=diff <your file path>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue