Improvements to Code Review Checkin Policy


Late last year I uploaded my first VS Gallery contribution – Colin’s ALM Corner Checkin Policies. One of the policies in this pack is a Code Review Checkin Policy. I blogged about it in this post.

One of the pieces of feedback I got about this policy was that this is counter the “checkin early, checkin often” mantra of most development shops. Some suggestions were to only apply this policy to “junior” team members, allowing “senior” members to checkin without requiring a review. I decided however to approach this from a source control perspective as opposed to a group membership perspective.

The policy now allows you to configure which source control paths it must fire on – so if you checkin files in the “mapping”, a code review is required, otherwise no code review is necessary. This means you can make the DEV branch (or your equivalent) review-free, while enforcing reviews on MAIN or LIVE branches, according to your practices. This way you get the benefit of “checkin early, checkin often” without the hassle of reviewing every single change. When you merge a bunch of changes through to MAIN or LIVE, you can then enforce Code Review (you would perform your code review on the merge-set).

Here’s what the Policy Configuration settings now look like:


You can see a list of “Paths to apply policy to”. Just add your source folders here and you get finer-grained control over when a Code Review is required.

Happy reviewing!