Managing Merge Requests, Using Code Review

Overall best practices

Responsibility of the author

Having your code reviewed

Please keep in mind that code review is a process that can take multiple iterations, and reviewers may spot things later that they may not have seen the first time.

Responsibility of the reviewer

Reviewing the code

Understand why the change is necessary (fixes a bug, improves the user experience, refactors the existing code). Then:

Finding balance

One of the most difficult things during code review is finding the right balance in how deep the reviewer can interfere with the code created by a reviewee.

FAQ

How do smaller changes help me and the project?

Smaller changes allow each change to be individually assessed and validating ensuring that specific set of code works exactly as the developer inteneds it to. It also helps a reviewer of the code, the smaller the change, the faster the reviewer can approve it meaning the faster that change gets added to the shared source allowing all the developers to work with that change. Later when going though history trying to identify issues, the smaller changes will help identify the direct intention of the code change allowing a developer to identify how the change may relate to the issue they are dealing with.

Why do code reviews matter?

The primary goal of a code reivew should be collaberation. The collaberation allows the reivewer and author of the code change to learn more about the project, enabling them both to make better changes to the project in the moment and in the future.

How do I keep reviews from taking up all my time?

Attribution

Some content copied from GitLab Code Review Guidelines