Skip to content

Commit

Permalink
[PM-16999] Move existing Android / Kotlin code style page to Contribu…
Browse files Browse the repository at this point in the history
…ting > Code Style (#518)

* Move kotlin best practices doc to Contributing > Code Style

* Rename kotlin codestyle doc

* Update page header

* rename kotlin docs file

* Fixed references in other pages
  • Loading branch information
vvolkgang authored Jan 14, 2025
1 parent 9ab611c commit 5496913
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/architecture/mobile-clients/android/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ retrieved via interactions with the [Bitwarden SDK](https://github.com/bitwarden

Note that these data sources are constructed in a manner that adheres to a very important principle
of the app: **that function calls should not throw exceptions** (see the
[style and best practices documentation](styles-best-practices.md#best-practices--kotlin) for more
details.) In the case of data sources, this tends to mean that suspending functions like those
representing network requests or Bitwarden SDK calls should return a
[style and best practices documentation](/docs/contributing/code-style/android-kotlin.md#best-practices--kotlin)
for more details.) In the case of data sources, this tends to mean that suspending functions like
those representing network requests or Bitwarden SDK calls should return a
[Result](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/) type. This is an important
responsibility of the data layer as a wrapper around other third party libraries, as dependencies
like Retrofit and the Bitwarden SDK tend to throw exceptions to indicate errors instead.
Expand Down Expand Up @@ -369,7 +369,7 @@ components. If there is any new unique UI component that is added, it should alw
it should be made a shareable component.

Refer to the
[style and best practices documentation](styles-best-practices.md#best-practices--jetpack-compose)
[style and best practices documentation](/docs/contributing/code-style/android-kotlin.md#best-practices--jetpack-compose)
for additional information on best practices when using Compose.

#### State-hoisting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Code Style Guidelines
---
title: Android & Kotlin
---

## Contents
# Android & Kotlin

The following outlines the general code style and best practices for Android development. It is
expected that all developers are familiar with the code style documents referenced here and have
Expand Down

0 comments on commit 5496913

Please sign in to comment.