Skip to content

Commit

Permalink
Initial list of best practices to follow in our project
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed Oct 29, 2020
1 parent 604aee2 commit 9f36bb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ which uses [google-java-format](https://github.com/google/google-java-format) li

`./gradlew spotless`

### Best practices that we follow

* Avoid exposing publicly any class/method/variable that don't need to be public;
* By default, all arguments/members are treated as non-null. Every argument/member that can be `null` must be annotated with `@Nullable`;
* The project aims to provide a consistent experience across all the public APIs. It is important to ensure consistency (same look and feel) across different public packages;
* Use `final` everywhere is possible, this ensures that classes cannot be extended when the API does not intend to offer that functionality;

### Pre-commit hook
To completely delegate code style formatting to the machine,
you can add [git pre-commit hook](https://git-scm.com/docs/githooks).
Expand Down

0 comments on commit 9f36bb5

Please sign in to comment.