Pull request checklist
Correct code
- Did you build and run the code?
- Does the code work as expected?
- Is the code as simple as possible?
- Do all the tests pass, and were they updated if necessary for the specified changes?
- When adding new features, did you add new tests?
- If this fixes a bug, is the bug actually fixed?
- If this fixes a bug, did you add a test that demonstrates the error and tests for it?
- Does this break any related behavior, or bring back old bugs?
- Did you fix any related TODOs or FIXMEs?
- Did you document any missing functionality that will be added later, creating additional tickets as necessary?
- If the project is set up for internationalization, are all new strings marked for translation?
Performance and Optimization
- Does the code perform well on average user devices, not just a high-end developer machine?
- Does the code introduce any performance regressions?
- Are there any obvious optimizations that can be made?
- Does the code use appropriate data structures?
- Does the code scale and preform well as expected production levels of data?
- Does the code avoid any N+1 queries?
Security and errors
- Are all inputs to a method properly sanitized?
- Are there any potential edge cases that aren’t being handled?
- Did you fix any warnings related to your changes?
- Are you appropriately handling all errors?
- How could your changes break or fail in ways you aren’t accounting for?
- How could this be exploited maliciously?
Neatness and syntax
- Are all related comments up to date and as clear as possible?
- Are all variable and method names as clear as possible?
- Were all variable names and strings spell-checked?
- Could you break up any large classes or methods into smaller classes/methods?
- Does the code follow any agreed-upon formatting or structure guidelines?
Dead code
- Did you remove any now-obsolete code?
- Remove any temporary log statements
- Remove any commented out code
- Do the remaining log statements serve a good purpose? Could they be replaced by actual error checking?
Opening the pull request
- Do the pull request title and description correctly explain the changes and why they are being made?
- Could the pull request be broken into separate chunks? Did you try to slip in unrelated changes?
Test your changes and read through the PR diff one final time.