Code reviews for developers - kanuku/misc GitHub Wiki

What are the descriptions and requirements
Branches
  • Are we merging into the right branch?
Speficication
  • Test it
  • Is it clear what has to be done in code?
  • Do you have questions? Then ask in code review or in private. Don't ignore it.
  • The devil is in the details, the dev might have missed something.
CODE itself
  • Check for commented out code (Ask to remove)
  • Are all parameters and variables final?
  • Is the code being checked with a unit-test?
  • Is there sensitive data(GDPR) being logged? Ask to change..
  • Is an exception is being thrown?
    • Why is an exception being throw?
    • Can you identify the call/task/job from the error message?
Kafka/Event
  • Will the application commit a cursor in case of error?
    • How is the error being handled in the listener?
    • Is it intentionally? Ask the developer why.
Passing of parameters
  • Is the code assuming the parameters are always non-null, if so, it needs to check for null arguments.
  • Do the names of parameters make sense? Specially in classes where the logic is trivial or complex.
Should the fields or parameters be marked with @NonNull annotation?
Logging
  • Is the application logging to files? This should not be the case with docker.
  • When you run the application logs on INFO, do you see unnecessary log lines?
Database Relations
  • Are relations mapped correctly?
  • One to many relations?
  • Many to one relations?
  • How would you map it?

Jacoco checks

docker run -p 9001:9001 -p 9000:9000 sonarqube:lts

 mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar