forked from seoklab/nurikit
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.clang-tidy
95 lines (94 loc) · 4.52 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
#
# Project NuriKit - Copyright 2023 SNU Compbio Lab.
# SPDX-License-Identifier: Apache-2.0
#
# Require clang-tidy v15
---
Checks: "-*,abseil-*,boost-*,bugprone-*,clang-*,concurrency-*,cppcoreguidelines-*,google-*,misc-*,modernize-*,openmp-*,performance-*,portability-*,readability-*,-boost-use-ranges,-bugprone-assignment-in-if-condition,-bugprone-crtp-constructor-accessibility,-bugprone-easily-swappable-parameters,-clang-analyzer-optin.core.EnumCastOutOfRange,-cppcoreguidelines-avoid-do-while,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables,-cppcoreguidelines-narrowing-conversions,-cppcoreguidelines-pro-*,-cppcoreguidelines-rvalue-reference-param-not-moved,-cppcoreguidelines-use-default-member-init,-google-explicit-constructor,-misc-no-recursion,-modernize-avoid-c-arrays,-modernize-return-braced-init-list,-modernize-loop-convert,-modernize-concat-nested-namespaces,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-modernize-use-auto,-modernize-use-default-member-init,-modernize-use-emplace,-modernize-use-equals-delete,-modernize-use-nodiscard,-performance-enum-size,-readability-isolate-declaration,-readability-identifier-length,-readability-qualified-auto,-readability-math-missing-parentheses,-readability-avoid-nested-conditional-operator,-*-magic-numbers"
FormatStyle: "file"
# If these flags are updated, .clangd should be updated as well
ExtraArgsBefore:
- -Weverything
- -Wno-c++98-compat
- -Wno-c++98-compat-pedantic
- -Wno-c++98-c++11-compat-binary-literal
- -Wno-exit-time-destructors
- -Wno-global-constructors
- -Wno-thread-safety-negative
- -Wno-sign-compare
- -Wno-sign-conversion
- -Wno-padded
- -Wno-weak-vtables
- -Wno-ignored-optimization-argument
- -Wno-unused-macros
- -Wno-disabled-macro-expansion
- -Wno-unsafe-buffer-usage
- -Wno-switch-default
- -fno-sanitize=all
CheckOptions:
- key: bugprone-stringview-nullptr.IncludeStyle
value: google
- key: bugprone-implicit-widening-of-multiplication-result.IncludeStyle
value: google
- key: cppcoreguidelines-init-variables.IncludeStyle
value: google
- key: misc-uniqueptr-reset-release.IncludeStyle
value: google
- key: misc-const-correctness.AnalyzeValues
value: "false"
- key: modernize-replace-auto-ptr.IncludeStyle
value: google
- key: modernize-loop-convert.IncludeStyle
value: google
- key: modernize-replace-random-shuffle.IncludeStyle
value: google
- key: modernize-pass-by-value.IncludeStyle
value: google
- key: modernize-make-shared.IncludeStyle
value: google
- key: modernize-make-unique.IncludeStyle
value: google
- key: performance-type-promotion-in-math-fn.IncludeStyle
value: google
- key: performance-unnecessary-value-param.IncludeStyle
value: google
- key: performance-unnecessary-value-param.AllowedTypes
value: "^(Eigen::Ref|nuri::(Mut|Const)Ref)"
- key: google-readability-braces-around-statements.ShortStatementLines
value: 3
- key: readability-braces-around-statements.ShortStatementLines
value: 3
# The following entries are (partailly) based on the Google C++ Style Guide.
# Namely, we use lower_case for function names, for better interoperability
# with the Python language.
# Types (class, struct, typedefs, ...) are *not* included here as a "rule",
# because they have much more exceptions than the others; however, most
# types should use CamelCase for readability.
- key: readability-function-cognitive-complexity.Threshold
value: "45"
- key: readability-function-cognitive-complexity.IgnoreMacros
value: "true"
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: k
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.MemberSuffix
value: _
# Due to (an issue of?) clang-tidy configuration engine, at least one
# non-empty entry must be defined to remove the suffix of public members.
- key: readability-identifier-naming.PublicMemberCase
value: lower_case
- key: readability-identifier-naming.PublicMemberSuffix
value: ""
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: misc-include-cleaner.IgnoreHeaders
value: "Eigen/.*;boost/.*;pybind11/.*"