[Development] Qt API review with clazy

Martin Smith Martin.Smith at qt.io
Mon Sep 12 08:30:18 CEST 2016


There is a flag that tells clang to keep going when it can't find something or encounters too many errors, but it is in clang 3.9.


martin

________________________________
From: Development <development-bounces+martin.smith=qt.io at qt-project.org> on behalf of Sergio Martins <sergio.martins at kdab.com>
Sent: Monday, September 12, 2016 12:34:53 AM
To: development at qt-project.org
Subject: Re: [Development] Qt API review with clazy

On Sunday, 11 September 2016 21:43:46 WEST Jérémie Delaitre wrote:
> Can the same checks be implemented in clang-tidy instead of having yet
> another tool? clang-tidy now has boost specific checks so maybe they would
> also accept a Qt specific module in there.

I haven't been able to use clang-tidy on big qmake projects such as Qt, it
either crashes or stops with "include not found" errors. It also requires an
intermediate step, where you generate a "compiler command database" file with
yet another tool [1]

clazy, otoh, is a compiler plugin, it integrates with your normal compilation
run, you don't have to run any more tools after doing "make" as you usually
do.

Enabling clazy is just a matter of modifying your CXX flags,  which you can
easily do with qmake or mkspec. Or ENABLE_CLAZY in CMake if you're building
KDE.


[1] https://github.com/rizsotto/Bear

Regards,
--
Sérgio Martins | sergio.martins at kdab.com | Senior Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - The Qt Experts
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160912/a3d0e0fb/attachment.html>


More information about the Development mailing list