mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68354 Lint rule: https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nodiscard.html This check adds a ton of noise to our diffs. `[[nodiscard]]` is typically only useful when ignoring the return value of a function is a critical error, e.g. for `operator new`. Test Plan: Verified that the lint does not get triggered Reviewed By: hlu1 Differential Revision: D32429731 fbshipit-source-id: ca3d90686ec8d419d3f96167140dc406df6f4a53
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
---
|
|
# NOTE there must be no spaces before the '-', so put the comma last.
|
|
InheritParentConfig: true
|
|
Checks: '
|
|
bugprone-*,
|
|
-bugprone-forward-declaration-namespace,
|
|
-bugprone-macro-parentheses,
|
|
-bugprone-lambda-function-name,
|
|
-bugprone-reserved-identifier,
|
|
cppcoreguidelines-*,
|
|
-cppcoreguidelines-avoid-magic-numbers,
|
|
-cppcoreguidelines-avoid-non-const-global-variables,
|
|
-cppcoreguidelines-interfaces-global-init,
|
|
-cppcoreguidelines-macro-usage,
|
|
-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,
|
|
-cppcoreguidelines-non-private-member-variables-in-classes,
|
|
-facebook-hte-RelativeInclude,
|
|
hicpp-exception-baseclass,
|
|
hicpp-avoid-goto,
|
|
modernize-*,
|
|
-modernize-concat-nested-namespaces,
|
|
-modernize-return-braced-init-list,
|
|
-modernize-use-auto,
|
|
-modernize-use-default-member-init,
|
|
-modernize-use-using,
|
|
-modernize-use-trailing-return-type,
|
|
-modernize-use-nodiscard,
|
|
performance-*,
|
|
-performance-noexcept-move-constructor,
|
|
-performance-unnecessary-value-param,
|
|
'
|
|
HeaderFilterRegex: 'torch/csrc/(?!deploy/interpreter/cpython).*'
|
|
AnalyzeTemporaryDtors: false
|
|
WarningsAsErrors: '*'
|
|
CheckOptions:
|
|
...
|