签入TFS 2013之前的代码检查 [英] Code Review before checking in to TFS 2013

查看:95
本文介绍了签入TFS 2013之前的代码检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施一个流程,以便经理可以查看 开发人员可以签入TFS 2013之前所有开发人员的代码.

I'm trying to implement a process so that the manager can Review the code of all developers before the developers can check in to TFS 2013.

在将代码添加到真实项目之前,是否有任何流程需要人工审查代码?

Is there any process to require a review of the code by a human being before it is added to a real project?

我正在将TFS 2013与Visual Studio 2013一起使用.

I'm using TFS 2013 with Visual Studio 2013.

推荐答案

TFS 2013对此提供了开箱即用的支持,并且非常简单易用.

TFS 2013 supports this out of the box, and is very straight forward to use.

开发者需要在团队资源管理器中提交审查请求:

Developer needs to file a request for review in the team explorer:

  • 转到团队资源管理器"
  • 打开待处理的更改
  • 在操作"菜单下,选择请求审核"
  • 指定审阅者,然后发送.

目标用户(在您的情况下为经理)将得到通知(如果您已在TFS上配置了电子邮件设置),并且还可以在团队资源管理器">我的工作"中查看审阅请求.

The target user (in your case, the manager) will get notified (if you've configured the Email settings on the TFS), and can also see the review requests in Team Explorer > My Work.

审阅者可以查看开发人员所做的所有更改,对其进行评论,然后将评论发送给开发人员.整个过程发生在Visual Studio中,所有注释都保存在TFS上,以后可以报告.

Reviewer can see all the changes made by the developer, comment on them, and send the comments to the developer. The whole thing happens inside Visual Studio, and all the comments are kept on TFS and can be reported later.

此外,在完成审查后,审阅者可以将其对变更的意见指定为看起来不错",有评论"或需要工作".

Also, upon completion of review, the reviewer can specify his/her opinion of the changes as "Looks Good", "With Comments" or "Needs Work".

请确保您已在MSDN上阅读以下内容: http://msdn.microsoft.com/en-us/library/hh474795.aspx

Make sure you read this page on MSDN regarding this: http://msdn.microsoft.com/en-us/library/hh474795.aspx

您也可以在第9频道观看此视频:

You can also check out this video on Channel 9: http://channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Visual-Studio-Ultimate-2012-Using-Code-Review-to-Improve-Quality

编辑

为防止不经检查即可入住,您可以使用入住政策.这是一个自定义的签入政策,要求在签入之前进行代码审查:

To prevent check-in without a review, you can use a check-in policy. Here's a custom check-in policy that requires code review before check-in:

https://visualstudiogallery.msdn.microsoft.com/c476b708-77a8-4065-b9d0 -919ab688f078

但是我应该指出,签入策略不是安全机制,可以将其视为提醒开发人员发送签入代码的方式.开发人员可以轻松地覆盖它们.

But I should point out that check-in policies are not security mechanisms, think of them as a reminder for the developer to send the code for check-in. Developers can easily override them.

如果您确实需要防止任何签入,则应拒绝开发人员的提交权限,并让他们使用代码审查(或搁置集)将其更改发送给经理.然后,经理可以取消更改并搁置,然后进行审核.

If you really need to prevent any check-ins, you should deny commit permission for developers, and have them send their changes to the manager using a code-review (or shelve set). The manager can then unshelve the changes and commit after reviewing.

这篇关于签入TFS 2013之前的代码检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆