Skip to content

Commit

Permalink
Fix obviously-broken .clang-tidy files (pytorch#28547)
Browse files Browse the repository at this point in the history
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`:
```
[[email protected] ~/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`:
```
[[email protected] ~/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
  • Loading branch information
wfarner authored and facebook-github-bot committed Oct 28, 2019
1 parent f5ea2ca commit 0c7537c
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
---
# NOTE there must be no spaces before the '-', so put the comma first.
Checks: '
-*
,bugprone-*
,-bugprone-forward-declaration-namespace
,-bugprone-macro-parentheses
,-bugprone-lambda-function-name
,cppcoreguidelines-*
,-cppcoreguidelines-interfaces-global-init
,-cppcoreguidelines-owning-memory
,-cppcoreguidelines-pro-bounds-array-to-pointer-decay
,-cppcoreguidelines-pro-bounds-constant-array-index
,-cppcoreguidelines-pro-bounds-pointer-arithmetic
,-cppcoreguidelines-pro-type-cstyle-cast
,-cppcoreguidelines-pro-type-reinterpret-cast
,-cppcoreguidelines-pro-type-static-cast-downcast
,-cppcoreguidelines-pro-type-union-access
,-cppcoreguidelines-pro-type-vararg
,-cppcoreguidelines-special-member-functions
,hicpp-exception-baseclass
,hicpp-avoid-goto
,modernize-*
,-modernize-return-braced-init-list
,-modernize-use-auto
,-modernize-use-default-member-init
,-modernize-use-using
,performance-*
,-performance-noexcept-move-constructor
# NOTE there must be no spaces before the '-', so put the comma last.
Checks: '-*,
bugprone-*,
-bugprone-forward-declaration-namespace,
-bugprone-macro-parentheses,
-bugprone-lambda-function-name,
cppcoreguidelines-*,
-cppcoreguidelines-interfaces-global-init,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
hicpp-exception-baseclass,
hicpp-avoid-goto,
modernize-*,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-using,
performance-*,
-performance-noexcept-move-constructor,
'
HeaderFilterRegex: 'torch/csrc/.*'
AnalyzeTemporaryDtors: false
Expand Down

0 comments on commit 0c7537c

Please sign in to comment.