视觉工作室中的令牌:HACK,TODO ......还有其他吗?

时间:2010-05-31 15:06:30

标签: visual-studio configuration token

你觉得在visual studio中有什么标记有用吗? ( visual studio 2010 环境任务列表→令牌)

目前我只有:

  • HACK -
  • 审核 - 高
  • TODO - 正常
  • WTF - 高

(只有这些 - 删除了一些默认的)

您使用的是其他人吗?

您是否通过评论标记报道任何其他重要事项?

任何最佳做法?日Thnx

5 个答案:

答案 0 :(得分:26)

这是我使用的那些:

  • TODO :功能尚未实施
  • FIXME :应修改/重构代码以实现某些目标(更高的可维护性,更好的性能等)
  • BUG :代码有一个已知错误

答案 1 :(得分:23)

我已经完成了大部分上述令牌的组合。

 RED: code that simply does not work / compile
 // Error - This code is throwing a specific reproducible error.
 // Broken - This code is broken and will not run.
 // WTF - WHAT THE FRIG.

 ORANGE: code that works but is not right
 // Hack - This code has intentionally been hacked in order to work. Should not go into production.
 // FixMe - This code works but could be better. Needs better abstraction, maintainability, performance, etc.
 // Bug - This code works and was expected to be right but a bug has been found. (usually flagged post production)
 // Review - This code is probably right but should be reviewed for piece of mind.
 // Smells - Same as FixMe

 BLUE: code that works but either needs more features or more explaining
 // Todo - Functionality is not yet implemented
 // Note - Better explain what's going on. This is gives a higher profile to standard comments, and allows notes to be found in the to-do pane.

答案 2 :(得分:8)

我喜欢Token REMOVE,表示它仅用于测试,不应包含在最终版本中

答案 3 :(得分:7)

另一个内置的是NOTE。

答案 4 :(得分:4)

Vim自动突出显示XXX,这恰好是我选择的标记,方便输入。

Sun's (old) Java coding conventions有这样的说法:

  

在评论中使用XXX来标记虚假但有效的内容。使用FIXME标记虚假和破坏的内容。