From 1efcebbadc90466924959f469e7623a523786977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= Date: Wed, 2 Dec 2020 15:12:18 +0100 Subject: [PATCH] Add section about coding style --- development-101.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/development-101.md b/development-101.md index f35cd94..24b31f4 100644 --- a/development-101.md +++ b/development-101.md @@ -44,6 +44,25 @@ The project uses the Gradle Witness to make sure third party dependencies have n ./update-dependency-pinning.sh +## Coding style + +There's an article on the +[https://code.briarproject.org/briar/briar/-/wikis/code-style](code-style) +used in the project. + +The coding style configuration is checked into version control at +`.idea/codeStyleSettings.xml` so that it will be picked up automatically by +Android Studio. AS does not automatically format your files when changing +them, so you need to remember to use `Ctrl+Alt+L` to format and also +`Ctrl+Alt+O` for organizing your imports. + +If you find that tedious, there are some alternatives: +* install the Save Actions plugin and configure it to perform those actions + while saving your file. +* Use AS to commit changes to git. If you do so, there's a small preferences + button on next to the commit button which let's you configure actions such + as 'Reformat code' and 'Optimize imports' that happen at commit time. + ## Coding patterns ### Patterns for visibility and interfaces