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

b0x*_*0rz 47 configuration token visual-studio

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

目前我只有:

  • 哈克 -
  • 评论 - 高
  • TODO - 正常
  • WTF - 高

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

你在使用其他人吗?

你是否用评论标记报道任何其他重要的事情?

任何最佳做法?日Thnx

Enr*_*lio 26

这是我使用的:

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

  • 我使用相同的:) - 我为我的FIXME做了子目录,即:FIXME - 性能. (2认同)

Cha*_*ell 25

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

 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.
Run Code Online (Sandbox Code Playgroud)


Kev*_*inA 9

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

  • 这是一个非常糟糕的做法.如果代码用于测试,则使用带有预处理器指令的条件编译. (6认同)
  • @AMissico 但是 `// REMOVE` 更容易 (2认同)

Tim*_*oyd 7

另一个内置的是NOTE.

  • 是的,不喜欢它,因为不是任何评论注意某种程度? (4认同)

Mar*_*off 5

Vim会自动突出显示XXX,这是我易于键入的首选标记。

Sun的(旧)Java编码约定有这样的说法:

XXX在评论中使用以标记虚假但有效的内容。使用FIXME来标记的东西是假的,并打破。