TFS 或 Visual Studio 能否提醒我在签入之前必须标记为已完成的问题
我实际上正在开发一个工具,需要进行一些配置才能使用。为了节省一些时间,将一些值硬编码到配置选项卡的文本框中,这样我就不必每次进行测试或调试时都租用它们。
当我们使用 TFS 来管理我们的解决方案时,我想知道是否有一种方法可以以某种方式标记这些硬编码元素,以便 TFS 或 Visual Studio 2008 会提醒我在签入之前删除/替换它们。
更新:
待办事项注释不会是真正的解决方案,因为我们已经使用它来标记必须重新编写的代码段。我们用它作为长期任务的提醒。我们有很多这样的东西,所以这可能会变得有点不清楚。
I'm actually working on a tool that need some configuration before it can be used. To save some time a hard coded some values into the text boxes of the configuration tab, so I don't have to renter them every time I do some testing or debugging.
As we're using TFS to manage our solutions I'm wondering if there is a way to mark those hard coded elements in some way so that TFS or Visual Studio 2008 will remind me to remove/replace them before I do a check in.
UPDATE:
The todo comments won't be a real solution as we're already using it to mark code segments which have to be reworked. We use it as a reminder for longterm tasks. And we have plenty of them so this might become a little bit unclear.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一些选项:
Some options:
可能不是完美的解决方案,但 Visual Studio 允许您添加可能效果良好的 TODO 注释对你来说足够了。
Probably not the perfect solution, but Visual Studio let's you add TODO comments that may work well enough for you.
您可以编写一个在找到硬编码内容时失败的单元测试。显然,您在签入之前不会收到提醒,但签入之后确实会出现构建失败。
You could write a unit test that fails when the hardcoded stuff is found. Obviously, you won't get a reminder before checking in but you do get a build failure afterwards.