diff options
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e14b07828..5f591330e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ # Contributing Read this when you want to: -* file an issue (bug or feature request) -* help translate the News file to your language +* [file an issue (bug or feature request)](#Issues) +* [help translate the News file to your language](#Translation) * start programming and change the way the News app works * add cool new feeds to the feed explore section * want to provide additional full text feed rules @@ -119,16 +119,8 @@ We usually hang out on **irc.freenode.net** in the **#nextcloud-news** and **#ne ### Coding Style Guidelines -* Use 4 spaces for indention. Why spaces? Because it looks the same on every machine and on the web where you can't normally control the tab width. -* Place the open curly braces on the same line as the parameter block, e.g.: - ```php - if (condition) { - // code - } else { - // code - } - ``` - -* Place a space before and after the parameter block for if, else, for, foreach, function -* Everything should be in camelCase except classes which should be in PascalCase -* For linting JavaScript, a [jshint file](https://github.com/nextcloud/news/blob/master/js/.jshintrc) is used that is run before compiling the JavaScript +The PHP code should all adhere to [PSR-2](https://www.php-fig.org/psr/psr-2/). +*Note that this is a different codestyle than nextcloud itself uses.* +To test the codestyle you can run `make phpcs`. + +For linting JavaScript, a [jshint file](https://github.com/nextcloud/news/blob/master/js/.jshintrc) is used that is run before compiling the JavaScript |