summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-01-28 22:32:49 +0100
committerGitHub <noreply@github.com>2019-01-28 22:32:49 +0100
commit9cd871983a368752d122a73da244606bdeba312f (patch)
treed1882e1e677d7cee12926e5688ccfbfd31a505f5 /CONTRIBUTING.md
parent31b2f194af74bdba60bdd2640e5fc47340157795 (diff)
parentbecce6b7520912257c3d72697a3aefec9923a467 (diff)
Merge pull request #382 from SMillerDev/codestyle_psr2
Define an official codestyle and adhere to it.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md22
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