Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial list of best practices to follow in our project #1925

Merged
merged 3 commits into from
Oct 31, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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` classes everywhere it is possible, this ensures that these classes cannot be extended when the API does not intend to offer that functionality;
bogdandrutu marked this conversation as resolved.
Show resolved Hide resolved

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