Clazy An open source Clang plugin allowing it to understand Qt semantics
Clazy is a Clang plugin which extends the compiler with over 50 warnings related to Qt best practices ranging from unneeded memory allocations to API misuse. It’s an opensource project spawned by KDAB’s R&D efforts for better C++ tooling.
At KDAB, we have a pretty cool Continuous Integration infrastructure to take care of our customers’ code: the CI team is constantly writing new extensions to support all kinds of linters, static checkers, sanitizers and code coverage tools. So when senior software engineer, Sérgio Martins, asked them if a graphical way to view Clazy’s results would be useful, they jumped on it immediately and agreed it made sense to also run it on Qt.
The usage is self-explanatory, you can click on different Qt modules, then for each module you can expand a warning type and see all source locations where it happens. You can also filter by level: bigger levels can have false-positives, or simply be more noisy or less important.
Download Clazy from our GIT page
If you like this article and want to read similar material, consider subscribing via our RSS feed.
Subscribe to KDAB TV for similar informative short video content.
KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.
Is there any place to discuss clazy and the produced warnings?
Sorry I didn’t see this before!
The places for discussion are:
– bug tracker: <https://bugs.kde.org/enter_bug.cgi?product=clazy>
– IRC: #kde-clazy (freenode)
– E-mail: smartins at kde.org