https://github.com/bearded-hen/javacodeguidelines
https://github.com/bearded-hen/javacodeguidelines
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bearded-hen/javacodeguidelines
- Owner: Bearded-Hen
- Created: 2017-05-17T10:10:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-17T10:44:43.000Z (over 8 years ago)
- Last Synced: 2025-02-15T18:50:17.764Z (11 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JavaCodeGuidelines
A code review checklist for Java/Android projects.
# Java
#### General
- Does the project pass all tests on the CI server?
- Is there any repetition in the code which can be avoided?
- Have the toString/equals/hashcode methods been implemented on model classes?
#### Stylistic
- Are there any excessively long lines (>120 chars)?
- Are there any excessively large methods/classes?
- Could any of the methods/classes/variables have a more appropriate name?
- Is the code formatted similarly to the rest of the project?
- Are there enough comments?
#### Error Handling
- Are stream resources closed?
- Are all exceptions handled?
- Does the code check for null references and handle them appropriately?
- Are method parameters validated if the code relies on assumptions (e.g. non-null, between 0-100)?
#### Mutability
- Is the accessibility level (public/protected/package/private) appropriate for all fields/methods/classes?
- Can it be final?
- Can the method return an empty List rather than null?
# Android
- Are listeners/receivers deregistered in the appropriate lifecycle method?
- Are there any references to views/activities/fragments/inner classes/async tasks which might leak memory?
- Do any long operations (disk io/network) run on a background thread?
- Are there any potential performance issues (e.g. unnecessary parent views, not using ViewHolder pattern)?
- Are user input fields validated?
- Does it use ButterKnife/latest technologies?