-
Notifications
You must be signed in to change notification settings - Fork 0
Contribute
Knight Hat edited this page Oct 16, 2023
·
1 revision
TL;DR: Be kind to each other
-
Do
- Be respectful: Treat all individuals with respect, regardless of their background, identity, or opinions.
- Be inclusive: Welcome and include diverse perspectives, experiences, and ideas.
- Be understanding: Seek to understand differing viewpoints and engage in constructive discussions.
- Be mindful: Be mindful of the impact our words and actions have on others in the community.
-
Don't
- Harassment: Any form of harassment, discrimination, or offensive behavior is unacceptable and will not be tolerated.
- Trolling: Deliberate and disruptive actions or comments with the intent to provoke or offend others.
- Hateful speech: Use of derogatory or offensive language, slurs, or personal attacks.
- Spam: Posting irrelevant or unsolicited content, including excessive self-promotion.
Some of the code formats are included in the source code and can be loaded if you are using Android Studio
- Use Kotlin for non static classes. Why?
- Use spaces for indent (4 spaces). Tab indent will be rejected at PR.
- Follow as close as possible to the existing code style and conventions.
- Check out files in .idea/ folder for details
- Be sure to write clear and concise code and documentation.
- Do NOT build a pyramid (at most 3 nested statements are allowed).
- Use easy to understand naming schemes
- Capitalize first character of a word (except for the very first) if name contains multiple words.
- Abbreviation: err stands for "error", do not name it e.
- A function/method should only do ONE job.
- A class is an idea of all functions/methods inside of it.
- If you're adding new features or make significant changes, consider adding relevant tests.
- If you're fixing a bug, please provide steps to reproduce the issue if applicable.
Reason will be updated in the near future as more things discovered.
- Static methods in Kotlin is hard to generate documentation.
-
Companion Object looks messy in Kotlin due to
@JvmStaticand other annotation. - Increase indentation.
- Keep the history as linear as possible.
- Avoid combining multiple classes to one commit.
- A commit is only about one change inside the class.
- If one change requires update in multiple classes, then multiple classes in one commit is allowed, but concise commit message is required.