APR
24
2016

clazy: Suppressing warnings

Clazy [1][2] just got support for suppressing warnings by reading a special comment in your code.
The syntax is similar to what krazy has.

Ignore the whole file:
// clazy:skip

Ignore the whole file for these checks:
// clazy:excludeall=foreach,qstring-allocations

Ignore these checks at the line number where the comment appears:
(...) // clazy:exclude=qfileinfo-exists,copyable-polymorphic

Enjoy!

[1] https://www.kdab.com/use-static-analysis-improve-performance/
[2] https://blogs.kde.org/2015/11/15/new-cqt-code-checks-clazy-static-analyzer