Skip to content

Commit 0c7537c

Browse files
wfarnerfacebook-github-bot
authored andcommitted
Fix obviously-broken .clang-tidy files (pytorch#28547)
Summary: Pull Request resolved: pytorch#28547 Pull Request resolved: pytorch/glow#3672 See D18090864 for more background. The issue i addressed there is more widespread, so i'm fixing all the other `.clang-tidy` files clearly not working as intended. Perhaps this means it's time to lint the linter config :-) Test Plan: Here's the resulting output for `~/fbsource/fbcode/third-party-buck/platform007/build/llvm-fb/bin/clang-tidy` related to each file touched: `fbcode/admarket/intent/.clang-tidy`: P119723794 `fbcode/caffe2/.clang-tidy`: P119723978 `fbcode/glow/glow/.clang-tidy`: P119724081 `fbcode/ice_palace/.clang-tidy`: P119724774 `fbcode/unified_graph/aggregator/.clang-tidy`: P119724375 `xplat/caffe2/.clang-tidy`: P119724464 `xplat/mcfcpp/.clang-tidy`: ``` [billfarner@devvm2187.ftw3 ~/fbsource/xplat/mcfcpp] ~/fbsource/fbcode/third-party-buck/platform007/build/llvm-fb/bin/clang-tidy -explain-config 'readability-identifier-naming' is enabled in the /home/billfarner/fbsource/xplat/mcfcpp/.clang-tidy. ``` `xplat/wa-msys/mcfcpp/.clang-tidy`: ``` [billfarner@devvm2187.ftw3 ~/fbsource/xplat/wa-msys/mcfcpp] ~/fbsource/fbcode/third-party-buck/platform007/build/llvm-fb/bin/clang-tidy -explain-config 'readability-identifier-naming' is enabled in the /home/billfarner/fbsource/xplat/wa-msys/mcfcpp/.clang-tidy. ``` Reviewed By: soumith Differential Revision: D18092684 fbshipit-source-id: 951307d125c0346322cb2c636c0300004a48d7a9
1 parent f5ea2ca commit 0c7537c

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

.clang-tidy

+27-28
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
---
2-
# NOTE there must be no spaces before the '-', so put the comma first.
3-
Checks: '
4-
-*
5-
,bugprone-*
6-
,-bugprone-forward-declaration-namespace
7-
,-bugprone-macro-parentheses
8-
,-bugprone-lambda-function-name
9-
,cppcoreguidelines-*
10-
,-cppcoreguidelines-interfaces-global-init
11-
,-cppcoreguidelines-owning-memory
12-
,-cppcoreguidelines-pro-bounds-array-to-pointer-decay
13-
,-cppcoreguidelines-pro-bounds-constant-array-index
14-
,-cppcoreguidelines-pro-bounds-pointer-arithmetic
15-
,-cppcoreguidelines-pro-type-cstyle-cast
16-
,-cppcoreguidelines-pro-type-reinterpret-cast
17-
,-cppcoreguidelines-pro-type-static-cast-downcast
18-
,-cppcoreguidelines-pro-type-union-access
19-
,-cppcoreguidelines-pro-type-vararg
20-
,-cppcoreguidelines-special-member-functions
21-
,hicpp-exception-baseclass
22-
,hicpp-avoid-goto
23-
,modernize-*
24-
,-modernize-return-braced-init-list
25-
,-modernize-use-auto
26-
,-modernize-use-default-member-init
27-
,-modernize-use-using
28-
,performance-*
29-
,-performance-noexcept-move-constructor
2+
# NOTE there must be no spaces before the '-', so put the comma last.
3+
Checks: '-*,
4+
bugprone-*,
5+
-bugprone-forward-declaration-namespace,
6+
-bugprone-macro-parentheses,
7+
-bugprone-lambda-function-name,
8+
cppcoreguidelines-*,
9+
-cppcoreguidelines-interfaces-global-init,
10+
-cppcoreguidelines-owning-memory,
11+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
12+
-cppcoreguidelines-pro-bounds-constant-array-index,
13+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
14+
-cppcoreguidelines-pro-type-cstyle-cast,
15+
-cppcoreguidelines-pro-type-reinterpret-cast,
16+
-cppcoreguidelines-pro-type-static-cast-downcast,
17+
-cppcoreguidelines-pro-type-union-access,
18+
-cppcoreguidelines-pro-type-vararg,
19+
-cppcoreguidelines-special-member-functions,
20+
hicpp-exception-baseclass,
21+
hicpp-avoid-goto,
22+
modernize-*,
23+
-modernize-return-braced-init-list,
24+
-modernize-use-auto,
25+
-modernize-use-default-member-init,
26+
-modernize-use-using,
27+
performance-*,
28+
-performance-noexcept-move-constructor,
3029
'
3130
HeaderFilterRegex: 'torch/csrc/.*'
3231
AnalyzeTemporaryDtors: false

0 commit comments

Comments
 (0)