-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Review Checklist
cpmeister edited this page Jun 24, 2020
·
12 revisions
Although we have coding guidelines and JavaDocs on the APIs, there are mistakes that are regularly done by new contributors in PRs, which often slip through the reviews.
This page should serve as a quick checklist for reviewers to remember what to look for to make sure that those things are addressed by the contributors.
This should be a living document, so every maintainer/reviewer is free to add stuff to the list, which he regularly notices in reviews.
- proper bundle name in pom.xml ("openHAB Add-ons :: Bundles :: BTicino ... Binding")
- include new bundles in build (main pom.xml) and karaf feature (in src/main/feature of the bundle)
- NOTICE: EPLv2 license with NOTICE file
- NOTICE: all dependencies must be listed in NOTICE file
- README: Based on our template, same sections should be present
- README: new line after every sentence
- README: section headers should be capitalized ("Thing Configuration", not "Thing configuration")
- README: mention all thing type ids, channel ids, configuration parameter keys in the appropriate section
- Thing/Channel labels should be short (<25 chars, max 2-3 words) and capitalized
- conservative use of log levels (mainly debug, unless bugs to report or misconfiguration other than on things)
- handler.initialize() to return fast and set a valid/correct Thing status
- use of lambdas for runnables
- handle REFRESH commands
- All conversions of byte[] to String or vice versa should have the Charset specified as well. This includes converting a Input/OuputStream to a Reader/Writer.
- Sockets and Input/OutputStreams should be used in try-with-resources statements if possible.
- Make sure that
@NonNullByDefault
added to every class with the exception of classes with a DTO suffix or in a dto package. - Duplicate code should be refactored where possible.
- In ThingHandler implementations, all asynchronous futures created during
initialize
should be cleaned up indispose
.