Skip to content

clazy.cmake - print manuallevel checks in the --list

Allen Winter requested to merge winterz/clazy:1.7 into master

Currently cmake --list doesn't print the set of manuallevel checks.

With this patch we get the following:

$ clazy --list
List of available clazy checkers:

Checks from level0. Very stable checks, 100% safe, no false-positives:
    connect-by-name
    connect-non-signal
    connect-not-normalized
    container-anti-pattern
    empty-qstringliteral
    fully-qualified-moc-types
    lambda-in-connect
    lambda-unique-connection
    lowercase-qml-type-name
    mutable-container-key
    overloaded-signal
    qcolor-from-literal
    qdatetime-utc
    qenums
    qfileinfo-exists
    qgetenv
    qmap-with-pointer-key
    qstring-arg
    qstring-comparison-to-implicit-char
    qstring-insensitive-allocation
    qstring-ref
    qt-macros
    strict-iterators
    temporary-iterator
    unused-non-trivial-variable
    writing-to-temporary
    wrong-qevent-cast
    wrong-qglobalstatic

Checks from level1. Mostly stable and safe, rare false-positives:
    auto-unexpected-qstringbuilder
    child-event-qobject-cast
    connect-3arg-lambda
    const-signal-or-slot
    detaching-temporary
    foreach
    incorrect-emit
    inefficient-qlist-soft
    install-event-filter
    non-pod-global-static
    overridden-signal
    post-event
    qdeleteall
    qhash-namespace
    qlatin1string-non-ascii
    qproperty-without-notify
    qstring-left
    range-loop
    returning-data-from-temporary
    rule-of-two-soft
    skipped-base-method
    virtual-signal

Checks form level2. Sometimes has false-positives (20-30%):
    base-class-event
    copyable-polymorphic
    ctor-missing-parent-argument
    function-args-by-ref
    function-args-by-value
    global-const-char-pointer
    implicit-casts
    missing-qobject-macro
    missing-typeinfo
    old-style-connect
    qstring-allocations
    returning-void-expression
    rule-of-three
    static-pmf
    virtual-call-ctor

Manual checks. Stability varies. must be explicitly enabled:
    assert-with-side-effects
    container-inside-loop
    detaching-member
    heap-allocated-small-trivial-type
    ifndef-define-typo
    inefficient-qlist
    isempty-vs-count
    jni-signatures
    qhash-with-char-pointer-key
    qproperty-type-mismatch
    qrequiredresult-candidates
    qstring-varargs
    qt4-qstring-from-array
    qt6-qlatin1string-to-u
    qt-keywords
    qvariant-template-instantiation
    raw-environment-function
    reserve-candidates
    signal-with-return-value
    thread-with-slots
    tr-non-literal
    unneeded-cast

Merge request reports

Loading