【问题标题】:Can I get build warnings from a custom build step in Qt Creator?我可以从 Qt Creator 中的自定义构建步骤中获得构建警告吗?
【发布时间】:2010-05-14 09:37:46
【问题描述】:

我有以下脚本,我在 Qt Creator 中作为自定义构建步骤运行:

git ls-files . | egrep "\.cpp$|\.h$" | xargs vera++

然后给出输出:

foo/bar.cpp:1: no copyright notice found

我也使用的另一个脚本是:

cppcheck . --template gcc -q --enable=style,unusedFunctions

输出:

apple.h:8: style: The class 'MyPie' has no constructor. Member variables
 not initialized.

我很想双击错误并转到“编译输出”窗口中的源代码。似乎只检测到 gcc 错误,即使它们具有相同的格式,也会忽略这些自定义错误。

【问题讨论】:

    标签: qt qt4 static-analysis qt-creator


    【解决方案1】:

    不幸的是,这是正确的:Qt Creator 使用输出解析器从应用程序的输出中过滤掉有趣的东西。此时,解析器是根据用于构建的工具链来选择的。自定义构建步骤此时没有分配任何输出解析器。我们应该添加一种方法,至少将现有解析器添加到自定义构建步骤中。

    我建议在 https://bugreports.qt.io/browse/QTCREATORBUG 的 Qt Creator bugtracker 中编写功能请求

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-05
      • 2019-02-22
      • 1970-01-01
      • 2016-09-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多