Clang-Tidy: Add loop checks
Add bugprone-infinite-loop and bugprone-too-small-loop-variable. Make bugprone-infinite-loop an error. Clang-Tidy checks apparently need to be specified in one blob. Do so in each of our config files.
This commit is contained in:
parent
b117767cf9
commit
abefb51ceb
@ -13,10 +13,8 @@ ExtraArgs:
|
||||
|
||||
# Checks to run. A complete list of checks can be found at
|
||||
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
||||
Checks:
|
||||
- '-*'
|
||||
- 'misc-no-recursion'
|
||||
Checks: '-*,misc-no-recursion,bugprone-infinite-loop,bugprone-too-small-loop-variable'
|
||||
|
||||
WarningsAsErrors: 'misc-no-recursion'
|
||||
WarningsAsErrors: 'misc-no-recursion,bugprone-infinite-loop'
|
||||
|
||||
UseColor: true
|
||||
|
@ -3,8 +3,6 @@ InheritParentConfig: true
|
||||
# We don't want to do any checks in this directory yet so hack around
|
||||
# the fact that Clang-Tidy won't let us disable all checks.
|
||||
# https://stackoverflow.com/a/58379342/82195
|
||||
Checks:
|
||||
- '-*'
|
||||
- 'misc-definitions-in-headers'
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
CheckOptions:
|
||||
- { key: 'HeaderFileExtensions', value: 'DISABLED' }
|
||||
|
@ -3,8 +3,6 @@ InheritParentConfig: true
|
||||
# We don't want to do any checks in this directory yet so hack around
|
||||
# the fact that Clang-Tidy won't let us disable all checks.
|
||||
# https://stackoverflow.com/a/58379342/82195
|
||||
Checks:
|
||||
- '-*'
|
||||
- 'misc-definitions-in-headers'
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
CheckOptions:
|
||||
- { key: 'HeaderFileExtensions', value: 'DISABLED' }
|
||||
|
@ -3,8 +3,6 @@ InheritParentConfig: true
|
||||
# We don't want to do any checks in this directory yet so hack around
|
||||
# the fact that Clang-Tidy won't let us disable all checks.
|
||||
# https://stackoverflow.com/a/58379342/82195
|
||||
Checks:
|
||||
- '-*'
|
||||
- 'misc-definitions-in-headers'
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
CheckOptions:
|
||||
- { key: 'HeaderFileExtensions', value: 'DISABLED' }
|
||||
|
@ -3,8 +3,6 @@ InheritParentConfig: true
|
||||
# We don't want to do any checks in this directory yet so hack around
|
||||
# the fact that Clang-Tidy won't let us disable all checks.
|
||||
# https://stackoverflow.com/a/58379342/82195
|
||||
Checks:
|
||||
- '-*'
|
||||
- 'misc-definitions-in-headers'
|
||||
Checks: '-*,misc-definitions-in-headers'
|
||||
CheckOptions:
|
||||
- { key: 'HeaderFileExtensions', value: 'DISABLED' }
|
||||
|
Loading…
x
Reference in New Issue
Block a user