Fixed handling of style descriptions
[GitHub/WoltLab/WCF.git] / CONTRIBUTING.md
CommitLineData
f9b320a3
TD
1CONTRIBUTING
2============
3
4First of all: Thanks for your interest in contributing to WoltLab Community Framework! You have to meet some requirements to get your changes accepted though.
5
6General requirements
7--------------------
8- Testing is key, you MUST try out your changes before submitting pull requests. It saves us and yourself a lot of time.
9- The code SHOULD be written by yourself, otherwise you have to check the license before for compatibility and give proper credit to the original author.
10
11Files
12-----
13- Unix newlines (\n) MUST be used in every file (php, tpl, less, js, etc.)
14- All files MUST be saved in ASCII encoding, except language files, which MUST be UTF-8 encoded
15
16Formatting
17----------
18- Tabs MUST be used for indentation, you HAVE TO use a tab size of 8
19 - empty lines MUST be indentated as deep as the previos line
20- All identifiers and comments MUST be written in englisch language
21- PHP
22 - The closing PHP tag MUST be omitted
23 - Every file MUST end with a newline character (\n)
24
25Additionally: Have a look at existing files to find out what they should look like.
26
27Automated tests
28---------------
29We are running [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) to ensure most of our formatting rules. You SHOULD test your changes before submission with it.
30
311. Install PHP Codesniffer, either via PEAR or via cloning it
322. Execute the following command in the root of your clone of Community Framework:
33
34 ```sh
35 $ phpcs -p --extensions=php --standard="`pwd`/CodeSniff/WCF" .
36 ```
373. Fix any errors
384. Repeat until no more errors show up