-
Notifications
You must be signed in to change notification settings - Fork 25
/
.clang-tidy
118 lines (117 loc) · 4.8 KB
/
.clang-tidy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Disabled checks:
# - bugprone-easily-swappable-parameters
# Not needed
# - bugprone-suspicious-include
# Too many false positives in "build/smuview_autogen". Maybe activate again
# when HeaderFilterRegex is working correctly.
# - misc-definitions-in-headers
# TODO: Used in deviceutil.hpp and datautil.hpp. Maybe to const static?
# - misc-non-private-member-variables-in-classes
# protected member variables are used all over the place...
# - misc-static-assert
# TODO: Replace all `assert("ex")` with `throw Ex()` and activate check!
# - misc-no-recursion
# We do use recursions
# - performance-unnecessary-value-param
# TODO: !
# - readability-avoid-const-params-in-decls
# TODO: Keep Decl and Def signatures the same! Recheck after
# performance-unnecessary-value-param solved! Maybe `const type` makes
# no sense:
# https://stackoverflow.com/questions/52916410/why-is-const-allowed-in-function-declarations
# - readability-braces-around-statements
# Even with `ShortStatementLines` = 3 there are too many false positives.
# - readability-convert-member-functions-to-static,
# TODO: Could this be useful in some cases?
# - readability-inconsistent-declaration-parameter-name
# This check shows to many false positives for Qt signal declarations. We can
# use CppChecks "funcArgNamesDifferent" instead.
# - readability-magic-numbers
# Magic numbers are ok. Maybe replace with macros(?) in the future?
# - readability-redundant-access-specifiers
# Used to often in header files, also not complatible with Qt access specifiers.
# public Q_SLOTS:
# public:
# - readability-function-cognitive-complexity
# TODO: Enable!
# - readability-use-anyofallof
# Foreach loops are ok for now
#
# TODO:
# - google-*,
# -google-readability-braces-around-statements,
# -google-readability-todo,
# - modernize-*,
# -modernize-raw-string-literal
#
Checks: >-
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-suspicious-include,
clang-diagnostic-*,
clang-analyzer-*,
google-explicit-constructor,
misc-*,
-misc-definitions-in-headers,
-misc-non-private-member-variables-in-classes,
-misc-static-assert,
-misc-no-recursion,
performance-*,
-performance-unnecessary-value-param,
readability-*,
-readability-avoid-const-params-in-decls,
-readability-braces-around-statements,
-readability-convert-member-functions-to-static,
-readability-inconsistent-declaration-parameter-name,
-readability-magic-numbers,
-readability-redundant-access-specifiers,
-readability-function-cognitive-complexity,
-readability-use-anyofallof,
WarningsAsErrors: ''
HeaderFilterRegex: '^src/.*$'
AnalyzeTemporaryDtors: false
FormatStyle: none
User: frank
CheckOptions:
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: readability-braces-around-statements.ShortStatementLines
value: '3'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: '1'
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: '1'
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
value: '1'
- key: readability-identifier-length.MinimumVariableNameLength
value: '2'
- key: readability-identifier-length.MinimumParameterNameLength
value: '2'
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: '1'
- key: readability-identifier-length.MinimumExceptionNameLength
value: '1'
- key: readability-qualified-auto.AddConstToQualified
value: '1'