.clang-tidy 2.37 KB
Newer Older
1
2
3
4
# clang-analyzer-cplusplus.NewDeleteLeaks triggers false-positives in QObject::connect()
# readability-redundant-access-specifiers triggered by Q_SLOTS
# readability-inconsistent-declaration-parameter-name trigered by generated Qt code
# performance-no-automatic-move is triggered by constness of qstring_literal_tmp in QStringLiteral macro
Daniel Vrátil's avatar
Daniel Vrátil committed
5
6
7
8
#
# TODO make those pass:
# readability-function-size - for now some tests and the generated code contains extremely long
#                             functions, which should be split into smaller functions
9

Daniel Vrátil's avatar
Daniel Vrátil committed
10
11
Checks: -*,
        bugprone-*,
12
13
14
        clang-analyzer-*,
        -clang-analyzer-osx,
        -clang-analyzer-cplusplus.NewDeleteLeaks,
Daniel Vrátil's avatar
Daniel Vrátil committed
15
16
17
18
19
20
        google-*,
        -google-build-using-namespace,
        -google-readability-todo,
        -google-runtime-references,
        -google-readability-function-size,
        -google-default-arguments,
21
22
23
24
25
26
27
28
29
30
31
32
        misc-*,
        -misc-definitions-in-headers,
        -*-non-private-member-variables-in-classes,
        performance-*,
        -performance-no-automatic-move,
        readability-*,
        -readability-avoid-const-params-in-decls,
        -readability-convert-member-functions-to-static,
        -readability-else-after-return,
        -readability-redundant-access-specifiers,
        -readability-implicit-bool-conversion,
        -readability-static-accessed-through-instance,
Daniel Vrátil's avatar
Daniel Vrátil committed
33
34
35
36
        -readability-inconsistent-declaration-parameter-name,
        -readability-magic-numbers,
        -readability-make-member-function-const,
        -readability-function-size
37
38
39
AnalyzeTemporaryDtors: true
CheckOptions:
    - key:  bugprone-assert-side-effects.AssertMacros
Daniel Vrátil's avatar
Daniel Vrátil committed
40
      value: 'Q_ASSERT;QVERIFY;QCOMPARE;AKVERIFY'
41
42
    - key:  CheckFunctionCalls
      value: true
Daniel Vrátil's avatar
Daniel Vrátil committed
43
    - key:  StringCompareLikeFuctions
Daniel Vrátil's avatar
Daniel Vrátil committed
44
      value: 'QString::compare;QString::localeAwareCompare'
Daniel Vrátil's avatar
Daniel Vrátil committed
45
46
47
    - key: WarnOnSizeOfIntegerExpression
      value: 1
    - key: bugprone-dangling-handle.HandleClasses
Daniel Vrátil's avatar
Daniel Vrátil committed
48
      value: 'std::string_view;QStringView'
Daniel Vrátil's avatar
Daniel Vrátil committed
49
50
51
    - key: IgnoreClassesWithAllMemberVariablesBeingPublic
      value: true
    - key: VectorLikeClasses
Daniel Vrátil's avatar
Daniel Vrátil committed
52
      value: 'std::vector;QVector'
Daniel Vrátil's avatar
Daniel Vrátil committed
53
54
55
56
57
58
59
60
WarningsAsErrors: bugprone-*,
                  clang-*,
                  google-*,
                  misc-*,
                  performance-*,
                  readability-*,
                  -readability-magic-numbers,
                  -readability-make-member-function-const
Daniel Vrátil's avatar
Daniel Vrátil committed
61