代码审读

This page describes the WebM Project code review process.

Reviewing a Change

To be the Approver for a change, you need to determine the following:

  • Is this change valid?
  • Does this change introduce design flaws that will cause problems in the future?
  • Does this change following the best practices that have been established for this project?
  • Is this change a good way to perform the described function?
  • Does this change introduce any security or instability risks?

Depending on the branch this change will be committed to, some of these criteria are relaxed. See therepository layout page for more information on our branch policy.

If you approve of the change, you will then mark it with LGTM (“Looks Good to Me”) within Gerrit.

Verifying a Change

To verify a change, you should:

  • Patch the change into your local client using one of the Download commands.
  • Build and test the change.
  • Within Gerrit use Publish Comments to mark the commit as “Verified”, or “Fails” (and add a message explaining what problems were identified).

Viewing Diffs and Comments

To open the details of the change within Gerrit, click on the Id number or Subject of a change. To compare the established code with the updated code, click the file name under Side-by-side diffs.

Adding Comments

Anyone in the community can use Gerrit to add inline comments to code submissions. A good comment will be relevant to the line or section of code to which it is attached in Gerrit. It might be a short and constructive suggestion about how a line of code could be improved, or it might be an explanation from the author about why the code makes sense the way it is.

To add an inline comment, double-click the relevant line of the code and write your comment in the text box that opens. When you click Save, only you can see your comment.

To publish your comments so that others using Gerrit will be able to see them, click the Publish Comments button. Your comments will be emailed to all relevant parties for this change, including the change owner, the patch set uploader (if different from the owner), and all current reviewers.

发表评论

电子邮件地址不会被公开。 必填项已用*标注