summaryrefslogtreecommitdiff
path: root/include/dbus_singleton.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-12-21 20:30:16 +0300
committerEd Tanous <ed@tanous.net>2023-01-17 19:44:09 +0300
commitcf9e417d3b88eb12f8c6a9d007d6a63c3eeb94f4 (patch)
tree45344ba086e93c7ff5589f9328b2c942679114ba /include/dbus_singleton.hpp
parent0d9462115c53d478ed757ca4a3cccd0acf593781 (diff)
downloadbmcweb-cf9e417d3b88eb12f8c6a9d007d6a63c3eeb94f4.tar.xz
Add check for globals
We don't follow this cpp core guidelines rule well. This is something that we should aspire to cleaning up in the future, but for the moment, lets turn the rule on in clang-tidy to stop the bleeding, add ignores for the things that we know need some better abstractions, and work on these over time. Most of this commit is just adding NOLINTNEXTLINE exceptions for all of our globals. There was one case in the sensor code where clang correctly noted that those globals weren't actually const, which got missed because of the use of auto. Tested: CI should be good enough for this. Passes clang-tidy. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ieda08fee69a3b209d4b3e9771809a6c41524f066
Diffstat (limited to 'include/dbus_singleton.hpp')
-rw-r--r--include/dbus_singleton.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/dbus_singleton.hpp b/include/dbus_singleton.hpp
index 283021641b..f9b50b078d 100644
--- a/include/dbus_singleton.hpp
+++ b/include/dbus_singleton.hpp
@@ -9,6 +9,7 @@ namespace connections
// Initialze before using!
// Please see webserver_main for the example how this variable is initialzed,
+// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
extern sdbusplus::asio::connection* systemBus;
} // namespace connections