From 222c303299437a0c580b530a6699a42dcfc13e8f Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Fri, 26 Jul 2019 10:40:54 +0100 Subject: [PATCH] #1307 update readme --- docs/codestyle.md | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/docs/codestyle.md b/docs/codestyle.md index 04c8b4fd2..36521e9ff 100644 --- a/docs/codestyle.md +++ b/docs/codestyle.md @@ -2,32 +2,13 @@ Our code style guidelines is based on the [Square's Android Style Guide](https://github.com/square/java-code-styles/blob/master/configs/codestyles/SquareAndroid.xml). -Download the xml file and [import it](https://user-images.githubusercontent.com/1624385/37678878-9b61b562-2c7f-11e8-9733-d1d593f0aa67.png) in IntelliJ/Android Studio. - -### For XML files - -Kiwix follows `2 spaces` for the `Indent` and `4 spaces` for the `Continuous Indent` values. (Same as that in Square's Style Guide) You can update these values using following steps: - -- Go to **Settings** -> **Editor** -> **Code Style** -> **XML** -- Update the respective values under the **Tabs and Indents** tab - -After changing the values, one can simply select the files to indent, `Right click` -> `Reformat Code` -> Check `Rearrange entries` -> `OK`. +Our code style is managed in version control and will be installed automatically when you clone the repo. ### Only a few extra rules -- Line length is 120 characters +- Line length is 100 characters - FIXME must not be committed in the repository use TODO instead. FIXME can be used in your own local repository only. -You can run a checkstyle with most rules via a gradle command: - -``` -$ ./gradlew checkstyle -``` - -It generates a HTML report in `build/reports/checkstyle/checkstyle.html`. - -Try to remove as much warnings as possible, It's not completely possible to remove all the warnings, but over a period of time, we should try to make it as complete as possible. - ### Some **DONT's** - Don't use Hungarian Notation like `mContext` `mCount` etc