Difference between revisions of "Code review"

From Software Heritage Wiki
Jump to navigation Jump to search
m
Line 7: Line 7:
 
# Code reviews (CRs) are '''strongly recommended''' for any non-trivial code change, but not mandatory (nor enforced at the VCS level).
 
# Code reviews (CRs) are '''strongly recommended''' for any non-trivial code change, but not mandatory (nor enforced at the VCS level).
 
# The CR [[Code review in Phabricator|'''workflow''']] is implemented using Phabricator/Differential.
 
# The CR [[Code review in Phabricator|'''workflow''']] is implemented using Phabricator/Differential.
# Explicitly '''suggest reviewer'''(s) when submitting new CR requests: either the most knowledgeable person(s) for the target code or the general [https://forge.softwareheritage.org/project/view/50/ Reviewers] group (which is also the [https://forge.softwareheritage.org/H18 default]).
+
# Explicitly '''suggest reviewer'''(s) when submitting new CR requests: either the most knowledgeable person(s) for the target code or the general [https://forge.softwareheritage.org/project/view/50/ reviewers] group (which is the [https://forge.softwareheritage.org/H18 default]).
 
# '''Review anything you want''': no matter the suggested reviewer(s), feel free to review any outstanding CR.
 
# '''Review anything you want''': no matter the suggested reviewer(s), feel free to review any outstanding CR.
 
# '''One LGTM is enough''': feel free to approve any outstanding CR.
 
# '''One LGTM is enough''': feel free to approve any outstanding CR.

Revision as of 12:58, 12 October 2018

This page documents code review practices used for Software Heritage development.

WORK IN PROGRESS page

Guidelines

  1. Code reviews (CRs) are strongly recommended for any non-trivial code change, but not mandatory (nor enforced at the VCS level).
  2. The CR workflow is implemented using Phabricator/Differential.
  3. Explicitly suggest reviewer(s) when submitting new CR requests: either the most knowledgeable person(s) for the target code or the general reviewers group (which is the default).
  4. Review anything you want: no matter the suggested reviewer(s), feel free to review any outstanding CR.
  5. One LGTM is enough: feel free to approve any outstanding CR.
  6. Review every day: CRs should be timely as fellow developers will wait for them. To make CRs team-sustainable each developer should allocate a fixed minimum amount of time for doing CR every (work ☺) day.

For more detailed suggestions (and much more) on the motivational and practical aspects of code reviews see Good reads below.

Good reads

Good reads on various angles of code review:

See also