In spirit of keeping our home (read codebase) clean and organized, we must have same protocol to talk.
Every pull request opened on the project needs to be scruitinzed on mutiple aspects. For example,
- How code is designed
- How code is formatted.
- How code structure is created
- What is the complexity of code analysis
- How well is it tested
Based on the code reviews done so far, following is the list of items that each pull request must adhere. As time goes on and we learn more, we add more ideas to the list.
- Use of loggers if really needed.No System.out.println() in codebase.
- Use of final wherever possible. Aim for Immutability
- Use of @Nonnull/@Nullable annotations to clearly define the contract
- Avoid commented out code. If its commented, its not needed, lets remove it
- Test judiciously. Assert as much as we could
- Unnecessary use of variables. Create variables only when they are needed more than once.
- Class names CamelCase. no exceptions in abbreviations
- Narrow the scope of variables. Declare them just where you use them
- Code Formatting issues. Please format the code as per the codebase in origin/master
- Use of Joda-Time for Date and Time. Read why
- Remove Dead Code. If we ever see any piece of code not being used, lets delete it
- Remove imports that are not needed. Your IDE could surely help. I know for IntelliJ IDEA
Let's make sure that every pull request we open atleast has the above attributes.