clang-tidy: Enable bugprone-unchecked-optional-access
Enable bugprone-unchecked-optional-access to detect the case that it
accesses std::optional without checking empty.
See https://gerrit.openbmc.org/c/openbmc/docs/+/78034 for details.
Change-Id: I5c2ccf5a734e9769d77c48e0de725ee87fac01af
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
diff --git a/.clang-tidy b/.clang-tidy
index 383c1a4..d1ca14d 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,6 +1,8 @@
Checks: '
--*,
-readability-identifier-naming'
+ -*,
+ bugprone-unchecked-optional-access,
+ readability-identifier-naming
+'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'