brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 1 | # Code Reviews |
| 2 | |
| 3 | Code reviews are a central part of developing high-quality code for Chromium. |
Lei Zhang | 3b32caa | 2021-03-22 17:24:19 | [diff] [blame] | 4 | All change lists (CLs) must be reviewed. |
brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 5 | |
Vincent Scheib | 66fc2d4 | 2024-10-30 02:55:03 | [diff] [blame] | 6 | This page documents policy rules regarding code changes. |
| 7 | |
| 8 | See also: |
| 9 | - The general patch, upload, and land process in [contributing code](contributing.md#code-review) |
| 10 | - [Code of conduct](../CODE_OF_CONDUCT.md) |
| 11 | - [Respectful Changes](cl_respect.md) |
| 12 | - [Respectful Code Reviews](cr_respect.md) |
| 13 | - The code review changes and OWNERS policy changes launched on March 24, 2021, see |
Jason D. Clinton | c38b61d8 | 2021-04-20 20:02:14 | [diff] [blame] | 14 | [Mandatory Code Review and Native OWNERS](code_review_owners.md). |
brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 15 | |
| 16 | # Code review policies |
| 17 | |
Ramzi N | be25013d | 2023-11-02 00:47:53 | [diff] [blame] | 18 | Any [committer](https://www.chromium.org/getting-involved/become-a-committer/#what-is-a-committer) can review code, but |
| 19 | an owner must provide a review for each directory you are touching. Ideally you should choose |
| 20 | reviewers who are familiar with the area of code you are touching. If you have doubts, look |
| 21 | at the `git blame` for the file and the `OWNERS` files ([more info](#owners-files)). |
brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 22 | |
John Abd-El-Malek | dfd1edc | 2021-02-24 22:22:40 | [diff] [blame] | 23 | To indicate a positive review, the reviewer provides a `Code-Review +1` in |
Michael Giuffrida | af36705 | 2018-03-22 20:22:34 | [diff] [blame] | 24 | Gerrit, also known as an LGTM ("Looks Good To Me"). A score of "-1" indicates |
| 25 | the change should not be submitted as-is. |
brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 26 | |
Ramzi N | be25013d | 2023-11-02 00:47:53 | [diff] [blame] | 27 | Submissions to the chromium/src repository by a change contributor who is not a Chromium |
| 28 | committer require two committers to Code-Review+1 the submission. If the owner of the CL |
| 29 | is already a committer, then only one other committer is needed to review. |
| 30 | |
Michael Giuffrida | af36705 | 2018-03-22 20:22:34 | [diff] [blame] | 31 | If you have multiple reviewers, provide a message indicating what you expect |
| 32 | from each reviewer. Otherwise people might assume their input is not required |
| 33 | or waste time with redundant reviews. |
brettw | 2019b9e | 2017-02-09 06:40:20 | [diff] [blame] | 34 | |
Annie Sullivan | d04212e7 | 2017-10-19 21:11:32 | [diff] [blame] | 35 | Please also read [Respectful Changes](cl_respect.md) and |
| 36 | [Respectful Code Reviews](cr_respect.md). |
| 37 | |
Robert Sesek | a8ee4a9 | 2023-07-13 23:04:30 | [diff] [blame] | 38 | There are also a [collection of tips](cl_tips.md) for productive reviews, though |
| 39 | these are advisory and not policy. |
| 40 | |
brettw | 2019b9e | 2017-02-09 06:40:20 | [diff] [blame] | 41 | #### Expectations for all reviewers |
brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 42 | |
Erik Chen | b3d9310f | 2025-01-07 19:41:35 | [diff] [blame] | 43 | * As a reviewer, aim to provide actionable feedback 3 times per work day. The |
| 44 | expectation is that if you're in the same time zone as the CL author, there |
| 45 | are 3 review iterations. If there is a time zone divide, aim for 2 review |
| 46 | iterations. |
brettw | 40e953e | 2017-02-08 17:49:28 | [diff] [blame] | 47 | |
Erik Chen | b3d9310f | 2025-01-07 19:41:35 | [diff] [blame] | 48 | * Use the status field in Gerrit settings to indicate if you're away and when |
Mike Frysinger | 7b15bde | 2018-05-15 09:28:05 | [diff] [blame] | 49 | you'll be back. |
brettw | 40e953e | 2017-02-08 17:49:28 | [
|