Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Avoid large commits with many changed source code lines, unless the changes were mechanical.

    • There is no hard limit on how many is “too many”: each reviewer has a different short-term memory and time availability.

    • One rule of thumb is that if your reviewer feels the commit or PR is too large, you should take their word for it.

    • Another rule of thumb is that if have manually changed more than 100 200 lines of code, you should ask yourself questions about commit granularity or at least negotiate this complexity in advance with your reviewer.

  • Avoid large number of commits. Again, there is no hard limit but you should be asking yourself questions about splitting the PR into smaller PRs when there are more than 3-5 commits or if the combined total number of lines changed non-mechanically across all commits is greater than 1001000.

  • Add an explanation “how to review” to commit messages and/or PR descriptions. The explanation could be like “The reviewer is invited to first consider the changes to the data structure in file X, then review how it is being read in places Y and Z, then inspect how it’s being written in file W.” This way the reviewer does not have to guess where to start and where to look next.

    • This is especially important when asking a review from someone who does not “own” the code being modified.

...