Add section about coding style

Sebastian Kürten
2020-12-02 15:12:18 +01:00
parent 0f10e25f58
commit 1efcebbadc

@@ -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