From f9b320a3d0007087079cb4999cf167add963a915 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 3 Jan 2013 14:08:00 +0100 Subject: [PATCH] Add CONTRIBUTING.md --- CONTRIBUTING.md | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 12 +----------- 2 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..15b1e6e729 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,38 @@ +CONTRIBUTING +============ + +First of all: Thanks for your interest in contributing to WoltLab Community Framework! You have to meet some requirements to get your changes accepted though. + +General requirements +-------------------- +- Testing is key, you MUST try out your changes before submitting pull requests. It saves us and yourself a lot of time. +- 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. + +Files +----- +- Unix newlines (\n) MUST be used in every file (php, tpl, less, js, etc.) +- All files MUST be saved in ASCII encoding, except language files, which MUST be UTF-8 encoded + +Formatting +---------- +- Tabs MUST be used for indentation, you HAVE TO use a tab size of 8 + - empty lines MUST be indentated as deep as the previos line +- All identifiers and comments MUST be written in englisch language +- PHP + - The closing PHP tag MUST be omitted + - Every file MUST end with a newline character (\n) + +Additionally: Have a look at existing files to find out what they should look like. + +Automated tests +--------------- +We 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. + +1. Install PHP Codesniffer, either via PEAR or via cloning it +2. Execute the following command in the root of your clone of Community Framework: + + ```sh + $ phpcs -p --extensions=php --standard="`pwd`/CodeSniff/WCF" . + ``` +3. Fix any errors +4. Repeat until no more errors show up \ No newline at end of file diff --git a/README.md b/README.md index 2abef086fd..78afb6e331 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,7 @@ This applies to all packages belonging to Community Framework. Contribution ------------ -Developers are always welcome to fork WCF and provide features or bug fixes using pull requests. If you make changes or add classes it is mandatory to follow the requirements below: - -* Testing is key, you MUST try out your changes before submitting pull requests -* You MUST save your files with Unix-style line endings (\n) and ASCII encoding -* You MUST NOT include the closing tag of a PHP block at the end of file, provide an empty newline instead -* You MUST use tabs for indentation - * Tab size of 8 is required - * Empty lines MUST be indented equal to previous line -* All comments within source code MUST be written in English language - -Follow the above conventions if you want your pull requests accepted. +For information on contributing to Community Framework refer to CONTRIBUTING.md in this folder. License ------- -- 2.20.1