Explicit font-display behavior for the icon font
[GitHub/WoltLab/WCF.git] / CONTRIBUTING.md
CommitLineData
f9b320a3
TD
1CONTRIBUTING
2============
3
e71525e4 4First of all: Thanks for your interest in contributing to WoltLab Suite Core! However, you have to meet some requirements in order to get your changes accepted.
f9b320a3 5
e068b7c6 6**Notice:** This is the development tree of WoltLab Suite Core representing the upcoming version of WoltLab Suite, if you wish to submit pull requests for WSC 3.0.x, please select the branch "3.0".
37111120 7
f9b320a3
TD
8General requirements
9--------------------
e068b7c6 10- **API changes are undesirable**, we want to maintain full backwards compatibility to WSC 3.0.x
ed12260e
G
11- Testing is the key, you MUST try out your changes before submitting pull requests. It saves us and yourself a lot of time.
12- The code SHOULD be written by yourself, otherwise you have to check the license beforehand with regard to compatibility and give the proper credit to the original author.
f9b320a3
TD
13
14Files
15-----
16- Unix newlines (\n) MUST be used in every file (php, tpl, less, js, etc.)
17- All files MUST be saved in ASCII encoding, except language files, which MUST be UTF-8 encoded
18
19Formatting
20----------
21- Tabs MUST be used for indentation, you HAVE TO use a tab size of 8
0af1095f
TD
22 - empty lines MUST be indentated as deep as the previous line
23- All identifiers and comments MUST be written in English
f9b320a3
TD
24- PHP
25 - The closing PHP tag MUST be omitted
26 - Every file MUST end with a newline character (\n)
27
28Additionally: Have a look at existing files to find out what they should look like.
29
30Automated tests
31---------------
ed12260e 32We are running [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) to ensure most of our formatting rules. You SHOULD test your changes before submitting them with it.
f9b320a3
TD
33
341. Install PHP Codesniffer, either via PEAR or via cloning it
e71525e4 352. Execute the following command in the root of your clone of WoltLab Suite Core:
f9b320a3
TD
36
37 ```sh
38 $ phpcs -p --extensions=php --standard="`pwd`/CodeSniff/WCF" .
39 ```
403. Fix any errors
ed12260e 414. Repeat it until no more errors occur