Repository navigation
Coding Standard
Yarden Lev edited this page Apr 4, 2017
·
11 revisions
This page defines the coding standards of our project and applies for all its contributors.
- This project is written (mainly) in Java.
- Use JDK 8 (latest version).
- If you wish to add code written in other languages, ask for permission.
- The IDE we work with is Eclipse Java Neon, with the newest version of the Spartanizer plugin installed.
- Fully spartanize the project before pushing commits.
- Disable Centification and Dollarization: Go to
Window->Preferences->Java->Installed JREs->Laconization Tipsand uncheck them.
- Avoid warnings.
- If you see warnings in the code, try to solve them (even if they are not yours). Consult the team if necessary.
- Run all tests.
- If a test fails, fix it before pushing.
- If you can't do it right now: Push your code, open an issue with a
Buglabel and explain the problem the best you can.
- Don't push commented-out code.
- If you must, explain why it is commented-out with a
TODOto whoever should un-comment it.
- If you must, explain why it is commented-out with a
- Try to commit a reasonable amount of code that makes sense logically.
- Your commits should have the following structure:
<Block> : <Title> <Explanations> Issue: #<Issue number>- Block: Specifies the part of the code you worked on (examples for our project: Android, Sensors, System, etc.)
- Title: A few words describing your commit (e.g. "Adding new server")
- Explanation: Explanation of the new features and / or content you added in this commit
- Issue number: The number of the issue that is relevant to this commit
- Each class should have
@authorand@sinceannotations, as well as a short description of the class.- Write your name and not your email in the
@authorannotation. - Example:
/** * @author Yarden * @author Ron * @since 3.4.17 * * <short description> */
- Write your name and not your email in the
- If you add code that is non-trivial in your opinion, add a short comment to explain it.
- Add JavaDoc to
publicandprotectedmethods.
Overview
Quick Start
Smarthouse Usage for Owners
Development Manuals
Continuous Development
Misc.