简体   繁体   English

在Visual Studio任务列表中隐藏TODO标记

[英]Hide TODO tag in Visual Studio Task List

Our codebase has a bunch of TODO comments that no one will ever fix and that the boss refuses to remove. 我们的代码库有一堆TODO注释,没有人会修复,老板拒绝删除。

I would like to hide the TODO's from the Visual Studio task list and just show my custom MEDO tags. 我想隐藏Visual Studio任务列表中的TODO,只显示我的自定义MEDO标签。

It appears that Visual studio will not let you remove the TODO tag from the task list. 似乎Visual Studio不允许您从任务列表中删除TODO标记。 The remove button is grayed out for TODO. TODO的删除按钮显示为灰色。 (You can remove all the other default tags, just not TODO.) (您可以删除所有其他默认标签,而不是TODO。)

Does anyone know some kind of hack or something that will allow me to remove them anyway? 有没有人知道某种黑客或其他什么东西可以让我删除它们? Maybe editing some config file somewhere? 也许在某处编辑一些配置文件?

As you've discovered, Visual Studio won't allow you to modify the TODO token, but you can trick it by using the Priority settings to filter it out. 正如您所发现的,Visual Studio将不允许您修改TODO令牌,但您可以使用“优先级”设置将其过滤掉来欺骗它。

First, set your MEDO token to "High Priority" as shown here: 首先,将您的MEDO令牌设置为“高优先级”,如下所示:

将MEDO令牌更改为高优先级

Then filter the Task List window to only show high priority items. 然后筛选“任务列表”窗口以仅显示高优先级项目。 (The filter button is hard to see on that column - you may need to widen it a bit.) (过滤器按钮很难在该列上看到 - 您可能需要稍微加宽它。)

过滤任务列表以仅显示高优先级项目

By default, Visual Studio includes the following tokens: HACK, TODO, UNDONE, NOTE. 默认情况下,Visual Studio包含以下标记:HACK,TODO,UNDONE,NOTE。

All you need to do is to remove the TODO from these list of predefined tokens. 您需要做的就是从这些预定义标记列表中删除TODO。 (you can create your own tokens as well) (你也可以创建自己的令牌)

On the Tools menu, choose Options. 在“工具”菜单上,选择“选项”。 Open the Environment folder and then choose Task List and then delete the TODO token. 打开Environment文件夹,然后选择Task List,然后删除TODO令牌。

So now you will continue to have TODO comments in your codebase but they will not show in your task list. 现在,您将继续在代码库中获得TODO注释,但它们不会显示在您的任务列表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM