This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 503
/
.clang-tidy
86 lines (85 loc) · 4.22 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
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Modified from the Apache Arrow project for the Terrier project.
#
---
Checks: '
bugprone-*,
clang-analyzer-*,
google-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-bugprone-exception-escape,
-bugprone-macro-parentheses,
-bugprone-too-small-loop-variable,
-clang-analyzer-cplusplus.NewDelete,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-google-readability-braces-around-statements,
-modernize-use-nodiscard,
-modernize-avoid-c-arrays,
-readability-braces-around-statements,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-uppercase-literal-suffix,
-portability-simd-intrinsics,
'
CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
- { key: readability-identifier-naming.FunctionCase, value: CamelCase }
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.MemberCase, value: lower_case }
- { key: readability-identifier-naming.MemberSuffix, value: _ }
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.UnionCase, value: CamelCase }
- { key: readability-identifier-naming.VariableCase, value: lower_case }
WarningsAsErrors: '*'
HeaderFilterRegex: '(benchmark|src|test|util)/include'
AnalyzeTemporaryDtors: true
#### Disabled checks and why: #####
#
# -bugprone-exception-escape,
# Suggest re-enabling in the future as it seems to find a few legit issues with destructors that can throw
# -bugprone-macro-parentheses,
# Suggest re-enabling in the future, I just didn't want to tackle it right now
# -bugprone-too-small-loop-variable,
# Complains about uin8_t or uint16_t when the limit on the loop is a container's .size() (size_t).
# We usually do this when we know the maximum size of the container though, so propose leaving disabled.
# -clang-analyzer-cplusplus.NewDelete,
# Seems to generate false positives. Suggest relying on ASAN and valgrind for memory stuff.
# -clang-analyzer-cplusplus.NewDeleteLeaks,
# Seems to generate false positives. Suggest relying on ASAN and valgrind for memory stuff.
# -google-readability-braces-around-statements,
# @tli2 really likes his single statements without braces
# -modernize-use-nodiscard,
# New C++17 that seems related to the GCC warned about unused result attribute. Would really clutter codebase.
# -modernize-avoid-c-arrays,
# Not feasible in the storage layer
# -readability-braces-around-statements,
# @tli2 really likes his single statements without braces
# -readability-isolate-declaration,
# Prevents "uint8_t x, y;" which I don't have a strong opinion about, but decided not to refactor now.
# -readability-magic-numbers,
# Blows up in tests. Found some reasonable issues in the src/ folder if we want to tackle them piecemeal.
# -readability-uppercase-literal-suffix,
# Easy to fix but touches the code all over and don't want to conflict with the TPL branch while we're trying to merge
# -portability-simd-intrinsics,
# Unavoidable. We explicitly want SIMD intrinsics.