forked from libuv/libuv
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.clang-tidy
More file actions
47 lines (41 loc) · 1.6 KB
/
.clang-tidy
File metadata and controls
47 lines (41 loc) · 1.6 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
---
# Configuration file for clang-tidy
# This configuration is tailored for the libuv C library project
# Use default checks with minimal necessary disables
Checks:
# don't suggest reordering struct definitions
- -clang-analyzer-optin.performance.Padding
# allow memcpy (instead of memcpy_s)
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
# allow strcpy
- -clang-analyzer-security.insecureAPI.strcpy
# allow TBAA
- -clang-analyzer-unix.MallocSizeof
# always allow `if () statement;` instead of `if () { statement; }`
- -readability-braces-around-statements
# allow any use of case and _ conventions in names
- -readability-identifier-naming
# allow defining a function prototype without naming all arguments
- -readability-named-parameter
# allow 1u instead of 1U constants
- -readability-uppercase-literal-suffix
# Configure specific check options
CheckOptions:
- key: performance-unnecessary-value-param.AllowedTypes
value: 'uv_.*_t'
- key: readability-braces-around-statements.ShortStatementLines
value: '2'
- key: readability-function-size.LineThreshold
value: '150'
- key: readability-function-size.StatementThreshold
value: '80'
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: 'true'
# Header filter - only analyze project files, not system headers
HeaderFilterRegex: '^.*/(src|include|test)/.*\.(h|c)$'
# Format style for fix suggestions
FormatStyle: file
# Treat warnings as errors
WarningsAsErrors: false
# Use color, even when run through a program like ninja
UseColor: true