Debian Codegraph @

.clang-tidy

raw
1 # SPDX-FileCopyrightText: 2025 Prayag Jain <[email protected]>
2 #
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 # clang-analyzer-cplusplus.NewDeleteLeaks triggers false-positives in QObject::connect()
6 # readability-redundant-access-specifiers triggered by Q_SLOTS
7 # readability-inconsistent-declaration-parameter-name trigered by generated Qt code
8 # performance-no-automatic-move is triggered by constness of qstring_literal_tmp in QStringLiteral macro
9 #
10 # TODO make those pass:
11 # readability-function-size - for now some tests and the generated code contains extremely long
12 # functions, which should be split into smaller functions
13
14 Checks: -*,
15 bugprone-*,
16 -bugprone-easily-swappable-parameters,
17 -bugprone-implicit-widening-of-multiplication-result,
18 -bugprone-narrowing-conversions,
19 -bugprone-suspicious-include,
20 clang-analyzer-*,
21 -clang-analyzer-apiModeling.*,
22 -clang-analyzer-optin.osx.*,
23 -clang-analyzer-optin.cplusplus.VirtualCall,
24 -clang-analyzer-cplusplus.NewDeleteLeaks,
25 -clang-analyzer-webkit.*,
26 -google-*,
27 misc-*,
28 -misc-definitions-in-headers,
29 -misc-include-cleaner,
30 -misc-no-recursion,
31 -misc-use-anonymous-namespace,
32 -*-non-private-member-variables-in-classes,
33 performance-*,
34 -performance-enum-size,
35 -performance-no-automatic-move,
36 readability-*,
37 -readability-avoid-const-params-in-decls,
38 -readability-avoid-nested-conditional-operator,
39 -readability-convert-member-functions-to-static,
40 -readability-else-after-return,
41 -readability-function-cognitive-complexity,
42 -readability-function-size,
43 -readability-identifier-length,
44 -readability-implicit-bool-conversion,
45 -readability-magic-numbers,
46 -readability-make-member-function-const,
47 -readability-math-missing-parentheses,
48 -readability-named-parameter,
49 -readability-qualified-auto,
50 -readability-redundant-casting,
51 -readability-simplify-boolean-expr,
52 -readability-static-accessed-through-instance,
53 -readability-use-std-min-max,
54 WarningsAsErrors: bugprone-*,
55 clang-*,
56 google-*,
57 performance-*,
58 CheckOptions:
59 - key: bugprone-assert-side-effects.AssertMacros
60 value: 'Q_ASSERT;QVERIFY;QCOMPARE;AKVERIFY'
61 - key: CheckFunctionCalls
62 value: true
63 - key: StringCompareLikeFunctions
64 value: 'QString::compare;QString::localeAwareCompare'
65 - key: WarnOnSizeOfIntegerExpression
66 value: 1
67 - key: bugprone-dangling-handle.HandleClasses
68 value: 'std::string_view;QStringView'
69 - key: IgnoreClassesWithAllMemberVariablesBeingPublic
70 value: true
71 - key: VectorLikeClasses
72 value: 'std::vector;QList'