在问题中显示任务列表文件

您可以使用代码扫描和分析工具来检查源代码。这些工具会报告问题供你修复。通过Qt Creator ,你可以将问题列表加载到问题中,以方便导航。

Qt Creator 您可以使用简单的基于行的文件格式来定义任务,以便使用脚本轻松生成。脚本既可以转换其他工具的报告,也可以从代码中创建任务列表格式的问题列表。有关检查新代码行并将其与正则表达式匹配以生成任务列表的脚本示例,请参阅 软件库中的 。Qt Creator scripts\mytasks.pl

管理任务列表条目

要打开Issues 中的任务列表文件,请选择File >Open 。右键单击任务列表条目可打开上下文菜单,其中包含管理条目的命令。您可以复制或删除任务列表条目,或导航到相应的源代码。

Qt Creator 在 中监控加载的文件并显示更改。要保留任务列表中的当前条目,但停止检查更改,请选择 。Issues Stop Monitoring

任务列表文件格式

文件扩展名必须为 .tasks,这样Qt Creator 才能将文件识别为任务列表文件。

任务列表文件中的每一行都被视为以制表符分隔的字符串列表,其中\t\n\\ 用作转义字符。字符串用于为每行创建一个任务。这些行可以是以下格式之一:

  • description
  • type\tdescription
  • file\ttype\tdescription
  • file\tline\ttype\tdescription

任务类型可以是以下值之一:

  • err 开头的字符串,在行首显示错误图标
  • warn 开头的字符串,显示警告图标
  • 任何其他值,将任务类型设置为未知,不显示图标

这些值不区分大小写。

第一列中以散列标记字符 (#) 开头的行将被忽略。

如果文件路径为相对路径,则以任务列表文件的父目录为基础。

另请参阅 问题查看输出

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.