Skip to content

Instantly share code, notes, and snippets.

@timurgen
Forked from nerandell/code-review-checklist.md
Last active February 7, 2022 13:43
Show Gist options
  • Select an option

  • Save timurgen/5a11106c127df32e447b3654bc0ff6e4 to your computer and use it in GitHub Desktop.

Select an option

Save timurgen/5a11106c127df32e447b3654bc0ff6e4 to your computer and use it in GitHub Desktop.

Revisions

  1. timurgen revised this gist Feb 7, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -73,6 +73,8 @@ Make sure these boxes are checked before submitting/approving the PR
    - [ ] All edge cases are described in comments
    - [ ] All unusual behaviour or edge case handling is commented
    - [ ] Data structures and units of measurement are explained
    - [ ] User documentation updated for any user facing change
    - [ ] Developer documentation updated if and where necessary


    # Security
  2. timurgen revised this gist Apr 4, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -39,6 +39,8 @@ Make sure these boxes are checked before submitting/approving the PR
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one are taken care of
    - [ ] No hardcoded congiguration params (as db connection etc)
    - [ ] Appropriate data structures used
    - [ ] Appropriate alghoritms used

    # Architecture
    - [ ] Design patterns if used are correctly applied
  3. timurgen revised this gist Apr 4, 2019. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@ Make sure these boxes are checked before submitting/approving the PR
    - [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
    - [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
    - [ ] `null` is not returned from any method
    - [ ] == operator and === (and its inverse !==) are not mixed up
    - [ ] == operator and === (and its inverse !==) are not mixed up, (== and equals in Java)
    - [ ] Floating point numbers are not compared for equality
    - [ ] Loops have a set length and correct termination conditions
    - [ ] Blocks of code inside loops are as small as possible
    @@ -38,6 +38,7 @@ Make sure these boxes are checked before submitting/approving the PR
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one are taken care of
    - [ ] No hardcoded congiguration params (as db connection etc)

    # Architecture
    - [ ] Design patterns if used are correctly applied
    @@ -59,7 +60,7 @@ Make sure these boxes are checked before submitting/approving the PR
    - [ ] Required logs are present
    - [ ] Frivolous logs are absent
    - [ ] Debugging code is absent
    - [ ] No `print_r`, `var_dump` or similar calls exist
    - [ ] No `print_r`, `var_dump` (PHP), `System.out` (Java), `print` (Python) or similar calls exist
    - [ ] No stack traces are printed

    # Documentation
  4. timurgen revised this gist Apr 4, 2019. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -76,7 +76,12 @@ Make sure these boxes are checked before submitting/approving the PR
    - [ ] All data inputs are checked (for the correct type, length/size, format, and range)
    - [ ] Invalid parameter values handled such that exceptions are not thrown
    - [ ] No sensitive information is logged or visible in a stacktrace
    - [ ] Doesn't contain vulnerable dependencies


    # Golang
    - [ ] A+ score here https://github.com/timurgen/salesforce-bulk-api-service https://goreportcard.com
    - [ ] A+ score here https://github.com/timurgen/salesforce-bulk-api-service https://goreportcard.com


    # Java
    - [ ] Checked with Spotbugs, PMD and Checkstyle
  5. timurgen revised this gist Apr 4, 2019. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -75,4 +75,8 @@ Make sure these boxes are checked before submitting/approving the PR
    # Security
    - [ ] All data inputs are checked (for the correct type, length/size, format, and range)
    - [ ] Invalid parameter values handled such that exceptions are not thrown
    - [ ] No sensitive information is logged or visible in a stacktrace
    - [ ] No sensitive information is logged or visible in a stacktrace


    # Golang
    - [ ] A+ score here https://github.com/timurgen/salesforce-bulk-api-service https://goreportcard.com
  6. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    Make sure these boxes are checked before submitting/approving the PR

    # General
    - [ ] The code works
    - [ ] The code is easy to understand
  7. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,6 @@
    - [ ] There are no usages of [magic numbers](http://c2.com/cgi/wiki?MagicNumber)
    - [ ] No hard coded constants that could possibly change in the future
    - [ ] All variables are in the smallest scope possible
    - [ ] All class, variable, and method modifiers are correct.
    - [ ] There is no commented out code
    - [ ] There is no dead code (inaccessible at Runtime)
    - [ ] No code that can be replaced with library functions
  8. Ankit Chandawala revised this gist Sep 19, 2016. No changes.
  9. Ankit Chandawala revised this gist Sep 19, 2016. No changes.
  10. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -51,6 +51,7 @@
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions
    - [ ] Any API change should be reflected in the API documentation
    - [ ] APIs return correct status codes in responses

    # Logging
    - [ ] Logging should be easily discoverable
  11. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,6 @@
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one are taken care of
    - [ ] Functions do ONE thing

    # Architecture
    - [ ] Design patterns if used are correctly applied
  12. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,11 @@
    # Architecture
    - [ ] Design patterns if used are correctly applied
    - [ ] [Law of Demeter](http://c2.com/cgi/wiki/LawOfDemeter?LawOfDemeter) is not violated
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))
    - [ ] A class should have only a single responsibility (i.e. only one potential change in the software's specification should be able to affect the specification of the class)
    - [ ] Classes, modules, functions, etc. should be open for extension, but closed for modification
    - [ ] Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program
    - [ ] Many client-specific interfaces are better than one general-purpose interface.
    - [ ] Depend upon Abstractions. Do not depend upon concretions.

    # API
    - [ ] APIs and other public contracts check input values and fail fast
  13. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -31,17 +31,19 @@
    - [ ] Blocks of code inside loops are as small as possible
    - [ ] No methods with boolean parameters
    - [ ] No object exists longer than necessary
    - [ ] Design patterns if used are correctly applied
    - [ ] No memory leaks
    - [ ] [Law of Demeter](http://c2.com/cgi/wiki/LawOfDemeter?LawOfDemeter) is not violated
    - [ ] Code is unit testable
    - [ ] Test cases are written wherever possible
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one are taken care of
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))
    - [ ] Functions do ONE thing

    # Architecture
    - [ ] Design patterns if used are correctly applied
    - [ ] [Law of Demeter](http://c2.com/cgi/wiki/LawOfDemeter?LawOfDemeter) is not violated
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))

    # API
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions
  14. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -12,11 +12,6 @@
    - [ ] There is no commented out code
    - [ ] There is no dead code (inaccessible at Runtime)
    - [ ] No code that can be replaced with library functions
    - [ ] Required logs are present
    - [ ] Frivolous logs are absent
    - [ ] Debugging code is absent
    - [ ] No `print_r`, `var_dump` or similar calls exist
    - [ ] No stack traces are printed
    - [ ] Variables are not accidentally used with null values
    - [ ] Variables are immutable where possible
    - [ ] Code is not repeated or duplicated
    @@ -51,6 +46,14 @@
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions
    - [ ] Any API change should be reflected in the API documentation

    # Logging
    - [ ] Logging should be easily discoverable
    - [ ] Required logs are present
    - [ ] Frivolous logs are absent
    - [ ] Debugging code is absent
    - [ ] No `print_r`, `var_dump` or similar calls exist
    - [ ] No stack traces are printed

    # Documentation
    - [ ] Comments should indicate WHY rather that WHAT the code is doing
  15. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,6 @@
    - [ ] Constructors do not accept null/none values
    - [ ] Catch clauses are fine grained and catch specific exceptions
    - [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise

    - [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
    - [ ] `null` is not returned from any method
    - [ ] == operator and === (and its inverse !==) are not mixed up
  16. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -28,9 +28,7 @@
    - [ ] Constructors do not accept null/none values
    - [ ] Catch clauses are fine grained and catch specific exceptions
    - [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions
    - [ ] Any API change should be reflected in the API documentation

    - [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
    - [ ] `null` is not returned from any method
    - [ ] == operator and === (and its inverse !==) are not mixed up
    @@ -50,7 +48,11 @@
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))
    - [ ] Functions do ONE thing


    # API
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions
    - [ ] Any API change should be reflected in the API documentation

    # Documentation
    - [ ] Comments should indicate WHY rather that WHAT the code is doing
    - [ ] All methods are commented in clear language.
  17. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -30,7 +30,7 @@
    - [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions
    - [ ] Any API change should be relfected in the API documentation
    - [ ] Any API change should be reflected in the API documentation
    - [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
    - [ ] `null` is not returned from any method
    - [ ] == operator and === (and its inverse !==) are not mixed up
  18. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -52,7 +52,7 @@


    # Documentation
    - [ ] Any inline comment should indicate WHY rather that WHAT the code is doing
    - [ ] Comments should indicate WHY rather that WHAT the code is doing
    - [ ] All methods are commented in clear language.
    - [ ] Comments exist and describe rationale or reasons for decisions in code
    - [ ] All public methods/interfaces/contracts are commented describing usage
  19. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,7 @@
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one are taken care of
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))
    - [ ] Functions do ONE thing


    # Documentation
  20. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@
    - [ ] Test cases are written wherever possible
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one
    - [ ] Loop iteration and off by one are taken care of
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))


  21. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,8 @@
    - [ ] Catch clauses are fine grained and catch specific exceptions
    - [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions?
    - [ ] API checks for correct oauth scope / user permissions
    - [ ] Any API change should be relfected in the API documentation
    - [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
    - [ ] `null` is not returned from any method
    - [ ] == operator and === (and its inverse !==) are not mixed up
  22. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,7 @@
    - [ ] Catch clauses are fine grained and catch specific exceptions
    - [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
    - [ ] APIs and other public contracts check input values and fail fast
    - [ ] API checks for correct oauth scope / user permissions?
    - [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
    - [ ] `null` is not returned from any method
    - [ ] == operator and === (and its inverse !==) are not mixed up
  23. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -45,6 +45,7 @@
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))


    # Documentation
    @@ -55,7 +56,7 @@
    - [ ] All edge cases are described in comments
    - [ ] All unusual behaviour or edge case handling is commented
    - [ ] Data structures and units of measurement are explained
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))


    # Security
    - [ ] All data inputs are checked (for the correct type, length/size, format, and range)
  24. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -44,6 +44,7 @@
    - [ ] Test cases are written wherever possible
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered
    - [ ] Loop iteration and off by one


    # Documentation
  25. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@
    - [ ] No stack traces are printed
    - [ ] Variables are not accidentally used with null values
    - [ ] Variables are immutable where possible
    - [x] Code is not repeated or duplicated
    - [ ] Code is not repeated or duplicated
    - [ ] There is an else block for every if clause even if it is empty
    - [ ] No complex/long boolean expressions
    - [ ] No negatively named boolean variables
  26. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@
    - [ ] No stack traces are printed
    - [ ] Variables are not accidentally used with null values
    - [ ] Variables are immutable where possible
    - [ ] Code is not repeated or duplicated
    - [x] Code is not repeated or duplicated
    - [ ] There is an else block for every if clause even if it is empty
    - [ ] No complex/long boolean expressions
    - [ ] No negatively named boolean variables
  27. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,7 @@
    - [ ] All edge cases are described in comments
    - [ ] All unusual behaviour or edge case handling is commented
    - [ ] Data structures and units of measurement are explained
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))

    # Security
    - [ ] All data inputs are checked (for the correct type, length/size, format, and range)
  28. Ankit Chandawala revised this gist Sep 19, 2016. No changes.
  29. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -43,6 +43,7 @@
    - [ ] Code is unit testable
    - [ ] Test cases are written wherever possible
    - [ ] Methods return early without compromising code readability
    - [ ] Performance is considered


    # Documentation
  30. Ankit Chandawala revised this gist Sep 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions code-review-checklist.md
    Original file line number Diff line number Diff line change
    @@ -53,6 +53,7 @@
    - [ ] All edge cases are described in comments
    - [ ] All unusual behaviour or edge case handling is commented
    - [ ] Data structures and units of measurement are explained
    - [ ] Code is [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)

    # Security
    - [ ] All data inputs are checked (for the correct type, length/size, format, and range)