-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
54 lines (52 loc) · 2.83 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
Checks: '-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,misc-*,performance-*,portability-*,readability-*,-*-magic-numbers,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-readability-function-cognitive-complexity,-misc-no-recursion,-bugprone-easily-swappable-parameters,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-avoid-goto,-*-non-private-member-variables-in-classes,-bugprone-macro-parentheses,-clang-analyzer-optin.performance.Padding,-cppcoreguidelines-explicit-virtual-functions,-cppcoreguidelines-macro-usage,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-special-member-functions,-readability-braces-around-statements,-readability-named-parameter,-readability-redundant-access-specifiers,-readability-redundant-member-init'
# Explicitly disabled warnings:
#
# It's hard to avoid magic numbers!
# cppcoreguidelines-avoid-magic-numbers
# readability-magic-numbers
#
# Has issues with assert()
# cppcoreguidelines-pro-bounds-array-to-pointer-decay
#
# I just don't like this one
# cppcoreguidelines-pro-bounds-constant-array-index
#
# I don't care enough to worry about this
# readability-function-cognitive-complexity
#
# I don't believe this one is helpful in general cases: it may be useful in certain restrictive
# environments, but that's not me
# misc-no-recursion
#
# I'm genuinely impressed by how much effort went into implementing this check, but
# sometimes you just have to live dangerously
# bugprone-easily-swappable-parameters
#
# tclap violates this one and I can't figure out how to exclude just tclap headers
# clang-analyzer-optin.cplusplus.VirtualCall
#
# gtest violates these and I can't figure out how to exclude just gtest headers
# cppcoreguidelines-avoid-non-const-global-variables
# cppcoreguidelines-owning-memory
# cppcoreguidelines-pro-type-vararg
# cppcoreguidelines-avoid-goto
#
# gbench violates so many checks that it's a wonder it builds at all
# *-non-private-member-variables-in-classes
# bugprone-macro-parentheses
# clang-analyzer-optin.performance.Padding
# cppcoreguidelines-explicit-virtual-functions
# cppcoreguidelines-macro-usage
# cppcoreguidelines-pro-type-const-cast
# cppcoreguidelines-pro-type-member-init
# cppcoreguidelines-special-member-functions
# readability-braces-around-statements
# readability-named-parameter
# readability-redundant-access-specifiers
# readability-redundant-member-init
HeaderFilterRegex: 'src/*'
CheckOptions:
# Allow implicit int->bool conversions as cctype functions (e.g. isalpha)
# return ints and "if (std::isalpha(val) != 0)" looks gross
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: '1'