-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-tidy
More file actions
90 lines (82 loc) · 2.64 KB
/
Copy path.clang-tidy
File metadata and controls
90 lines (82 loc) · 2.64 KB
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
---
# clang-tidy configuration for C23 code (NOT C++)
# This project uses pure C with C23 standard features.
# Reference: https://clang.llvm.org/extra/clang-tidy/
# Enable C-specific checks, disable C++ checks
Checks: >
-*,
bugprone-*,
cert-*,
clang-analyzer-*,
concurrency-*,
misc-*,
performance-*,
portability-*,
readability-braces-around-statements,
readability-const-return-type,
readability-duplicate-include,
readability-identifier-naming,
readability-inconsistent-declaration-parameter-name,
readability-isolate-declaration,
readability-magic-numbers,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-simplify-boolean-expr,
readability-static-accessed-through-instance,
readability-string-compare,
-bugprone-easily-swappable-parameters,
-bugprone-reserved-identifier,
-bugprone-narrowing-conversions,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-signal-handler,
-bugprone-assignment-in-if-condition,
-cert-dcl37-c,
-cert-dcl51-cpp,
-cert-err33-c,
-cert-err34-c,
-cert-msc54-cpp,
-cert-sig30-c,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-misc-include-cleaner,
-performance-no-int-to-ptr,
-readability-identifier-length,
-readability-magic-numbers
# Treat warnings as errors for strict enforcement
WarningsAsErrors: '*'
# Only check project headers, not system headers
HeaderFilterRegex: '.*/stem/(src|include|tests)/.*'
# C23-specific configuration
CheckOptions:
# Naming conventions for C
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.StructCase
value: lower_case
- key: readability-identifier-naming.EnumCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.TypedefSuffix
value: _t
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
# Allow certain common patterns
- key: readability-braces-around-statements.ShortStatementLines
value: '1'
# Performance settings
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: 'false'
# Force C language mode (not C++)
FormatStyle: file
User: stem-project
...