When I was first starting out, the most common feedback I’d receive from other developers was to “slow down”. I think every young developer wants to be the “rockstar” on the team and appear faster and more productive than everyone else.
Personally, this would mean that I’d often create pull requests (PR) or release features without doing nearly enough testing just so I seemed “fast”. I was always too eager to move on to the next problem.
Over time, I came to terms with the idea that letting obvious mistakes slip through the cracks would have a more lasting impact on my colleagues than taking some extra time to check my work.
So, I started a PR checklist for myself to help manage that tendency.
I wouldn’t allow myself to create a pull request or call a feature complete unless I had walked through every item on the list.
This has proven to be a really useful tool for myself, so I thought I’d share it with you as a starting point if you want to create your own. Additionally, I’ve added some items to address the most common comments I would receive on PRs, so I could catch those mistakes early.
By including topics I frequently overlooked, the quality of my work and the depth of my testing have improved.
This is an open-source document, so if there’s anything I missed feel free to create a pull request or fork it and create your own!
- Am I duplicating existing code?
- Is everything behind a feature flag that should be?
- Am I force unwrapping anything?
- Did I resolve any ambiguous constraints / handle any breaking constraint at runtime issues?
- Am I introducing any unnecessary
- If you added a
defaultcase to a
switch, are you absolutely sure that’s the ideal solution?
- Did I document everything that I needed to?
- Am I introducing any long running operations on the main thread?
- Did you specify the correct access level for any of the new entities you introduced?
- Am I using any “magic numbers”? Should I add them to our constants?
- Am I following the teams coding conventions throughout my changes?
- Did I receive design and product approval?
- Did I remove any extraneous
selfreferences? [Swift only]
- Could any of my new code be replaced by native functions or existing helper functions?
- Did I chose appropriate names for my classes, enums, structs, methods, and variables?
- Am I handling and logging all errors correctly?
- Are there tests? Should there be?
- Did I test night mode support or remember to disable it?
- Did I test for memory leaks? Did I make everything
weakthat should be?
- Did I test multiple screen sizes and orientations?
- Did I test on the lowest iOS version we support?
- Did I test what happens if the user declines / limits permission access (location, camera roll, contacts, etc)?
- Did I test for accessibility compatibility?
- Did I test a poor or offline WiFi connection?
- Did I test what happens if the API calls fail?
- Do the existing tests (unit & UI) pass?
- Did I test with
Double Length Pseudolanguageto ensure that text wraps and can accommodate more verbose languages?
- Did I test other languages we support to ensure there’s no missing translations?
- Did I test different locales and languages? Did the currency, time, and date formatting work as expected?
Creating A Pull Request
- Am I introducing any new warnings into the Xcode project?
- Does linting pass?
- Does my PR include screenshots and instructions on how to test these changes?
- Did I remove any commented out code?
- Did I pull in
masterand resolve any merge conflicts before opening a pull request?
- Did I remove all
@hack, and placeholder code?
- Did I remove all of the
- Did I link to the ticket in the PR?