views:

81

answers:

1

I have the following script that I run as a custom build step in Qt Creator:

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

Which then gives output:

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

Another script I also use is:

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

With the output:

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

I would love to double-click on the error and go to the source in the Compile Output window. It seems that only gcc errors are detected and these custom ones are ignored even though they have the same format.

A: 

That is unfortunately correct: Qt Creator uses output parsers to filter out interesting stuff from the output of applications. At this time the parsers are chosen based on toolchains used to build. Custom build steps do not get any output parsers assigned at this time. We should add a way to at least add existing parsers to custom build steps.

I recommend writing a feature request in the Qt Creator bugtracker at http://bugreports.qt.nokia.com/browse/QTCREATORBUG

Tobias Hunger
Thanks for your answer
Derick