summaryrefslogtreecommitdiff
path: root/.clang-tidy
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-03-17 04:04:41 +0300
committerEd Tanous <ed@tanous.net>2024-03-27 22:17:59 +0300
commitd547d8d2c30a7d00852855da8ecc15c0cc424b0e (patch)
tree2bbb8dbb164443c963c5556bfb18d80e20153cb8 /.clang-tidy
parent49cc263fdcfc9b279c399c0b03bfd7e9167e06c2 (diff)
downloadbmcweb-d547d8d2c30a7d00852855da8ecc15c0cc424b0e.tar.xz
Check optionals in tidy
clang-tidy-18 makes this feature stable enough for us to use in general. Enable the check, and fix the couple of regressions that have snuck in since we last ran the check. Tidy seems to not be able to understand that ASSERT will not continue, so if we ASSERT a std::optional, it's not a bug. Add explicit checks to keep tidy happy. Tested: clang-tidy passes. Change-Id: I0986453851da5471056a7b47b8ad57a9801df259 Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to '.clang-tidy')
-rw-r--r--.clang-tidy1
1 files changed, 1 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy
index c7963c089e..4862d2c1fe 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -58,6 +58,7 @@ bugprone-swapped-arguments,
bugprone-terminating-continue,
bugprone-throw-keyword-missing,
bugprone-too-small-loop-variable,
+bugprone-unchecked-optional-access,
bugprone-undefined-memory-manipulation,
bugprone-undelegated-constructor,
bugprone-unhandled-exception-at-new,