代码审查“ToDo”跟进项目
我正在尝试在我的公司进行代码审查,最近我们召开了第一次代码审查会议。会议期间,大家提出了一些积极的建议,我在代码中添加了 TODO
注释以进行后续处理。
在阅读了此处有关代码审查最佳实践的建议后,我想在下次会议开始时跟进我纠正的所有项目。有没有办法向代码添加类似类型的注释(例如 FOLLOWUP
),以便我可以在下次会议中快速突出显示这些代码段?
I am trying to institute code reviews at my company, and recently we had our first code review meeting. During the meeting, several positive suggestions were made and I added TODO
comments in my code for following up.
After reading suggestions on here on best practices for code reviews, I would like to follow up on all the items I corrected at the start of the next meeting. Is there a way to add a similar type of comment to the code such as FOLLOWUP
so that I can quickly highlight through those code segments in the next meeting?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以创建自己的评论令牌。这可以在“工具”>“工具”下找到
。选项>环境>任务列表>评论标记
以下链接提供了更多信息。它们面向 Visual Studio 2005,但相同的信息也适用于 Visual Studio 2010
http://msdn.microsoft.com/en-us/library/ekwz6akh%28v=VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/zce12xx2%28VS.80%29。 ASPX
You can create your own comment tokens. This can be found under
Tools > Options >Environment > Task List > Comment tokens
The following link provides more info. They are geared towards Visual Studio 2005, but the same info works for Visual Studio 2010
http://msdn.microsoft.com/en-us/library/ekwz6akh%28v=VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/zce12xx2%28VS.80%29.aspx
您不应该在实际会议中遍历代码。每个参与者都应该在会议之前查看并审查代码。因此,diff 工具就足够了。代码中不需要注释——只需要提交注释。
如果您第一次在审查会议上看到代码,那么您就做错了并且浪费了时间。
编辑:
我推荐这本书
You shouldn't be walking though the code in the actual meeting. Each participant should have already looked at and reviewed the code prior to the meeting. Thus, diff tools are all that are needed. No need for comments in the code - only commit comments are necessary.
If you are first seeing code in a review meeting then you are doing it wrong and wasting time.
EDIT:
I'd recommend this book
您可以将自己的令牌(例如“FOLLOWUP”)添加到令牌列表中:菜单
工具 - 选项
,选项环境/任务列表
。You can add your own tokens (such as "FOLLOWUP") to the token list: Menu
Tools - Options
, optionEnvironment / Task List
.