Apply misc-include-cleaner fixes
misc-include-cleaner seems to have found a lot more things all of a
sudden. Unclear why the result has changed, but we can just fix the
issues.
Tested: Clang-tidy now passes. Code compiles.
Change-Id: Iab045cc183f0daef663b4d5ac901200a42807987
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/src/DeviceMgmt.hpp b/src/DeviceMgmt.hpp
index 4b4dea8..5247486 100644
--- a/src/DeviceMgmt.hpp
+++ b/src/DeviceMgmt.hpp
@@ -2,11 +2,25 @@
#include "Utils.hpp"
-#include <boost/container/flat_map.hpp>
+#include <strings.h>
+#include <boost/algorithm/string/replace.hpp>
+#include <boost/container/flat_map.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/bus/match.hpp>
+#include <sdbusplus/message.hpp>
+
+#include <cstddef>
+#include <cstdint>
#include <functional>
+#include <iostream>
+#include <memory>
#include <optional>
-#include <string_view>
+#include <stdexcept>
+#include <string>
+#include <utility>
+#include <variant>
+#include <vector>
struct I2CDeviceType
{
diff --git a/src/PwmSensor.hpp b/src/PwmSensor.hpp
index 63970ca..a030d60 100644
--- a/src/PwmSensor.hpp
+++ b/src/PwmSensor.hpp
@@ -1,9 +1,9 @@
#pragma once
-#include "sensor.hpp"
-
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/src/SensorPaths.hpp b/src/SensorPaths.hpp
index 8524400..b776b50 100644
--- a/src/SensorPaths.hpp
+++ b/src/SensorPaths.hpp
@@ -1,7 +1,6 @@
#pragma once
#include <cstring>
-#include <regex>
#include <string>
namespace sensor_paths
diff --git a/src/Thresholds.hpp b/src/Thresholds.hpp
index 6338290..17c2649 100644
--- a/src/Thresholds.hpp
+++ b/src/Thresholds.hpp
@@ -4,8 +4,12 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
-#include <nlohmann/json.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include <limits>
#include <list>
#include <memory>
#include <string>
diff --git a/src/Utils.hpp b/src/Utils.hpp
index 21384b5..fe1f478 100644
--- a/src/Utils.hpp
+++ b/src/Utils.hpp
@@ -7,16 +7,28 @@
#include <boost/container/flat_map.hpp>
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
-#include <sdbusplus/message/types.hpp>
+#include <sdbusplus/bus/match.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/message/native_types.hpp>
+#include <algorithm>
+#include <charconv>
+#include <chrono>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
#include <filesystem>
#include <functional>
#include <iostream>
#include <memory>
#include <optional>
#include <regex>
+#include <set>
#include <span>
+#include <stdexcept>
#include <string>
+#include <string_view>
+#include <system_error>
#include <tuple>
#include <utility>
#include <variant>
diff --git a/src/VariantVisitors.hpp b/src/VariantVisitors.hpp
index 27185ca..80d07da 100644
--- a/src/VariantVisitors.hpp
+++ b/src/VariantVisitors.hpp
@@ -19,7 +19,6 @@
#include <stdexcept>
#include <string>
-#include <variant>
namespace details
{
diff --git a/src/adc/ADCSensor.hpp b/src/adc/ADCSensor.hpp
index 16d9c66..9a9050e 100644
--- a/src/adc/ADCSensor.hpp
+++ b/src/adc/ADCSensor.hpp
@@ -1,16 +1,22 @@
#pragma once
#include "Thresholds.hpp"
+#include "Utils.hpp"
#include "sensor.hpp"
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/posix/stream_descriptor.hpp>
+#include <boost/asio/steady_timer.hpp>
#include <boost/asio/streambuf.hpp>
#include <gpiod.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
+#include <iostream>
#include <memory>
#include <optional>
-#include <stdexcept>
#include <string>
+#include <system_error>
#include <vector>
class BridgeGpio
diff --git a/src/exit-air/ExitAirTempSensor.hpp b/src/exit-air/ExitAirTempSensor.hpp
index 68952ab..9f20c70 100644
--- a/src/exit-air/ExitAirTempSensor.hpp
+++ b/src/exit-air/ExitAirTempSensor.hpp
@@ -1,12 +1,18 @@
#pragma once
+#include "Thresholds.hpp"
+
#include <boost/container/flat_map.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
#include <sdbusplus/bus/match.hpp>
#include <sensor.hpp>
#include <chrono>
+#include <cstdint>
#include <limits>
#include <memory>
#include <string>
+#include <utility>
#include <vector>
struct ExitAirTempSensor;
diff --git a/src/external/ExternalSensor.hpp b/src/external/ExternalSensor.hpp
index c3a7103..495c596 100644
--- a/src/external/ExternalSensor.hpp
+++ b/src/external/ExternalSensor.hpp
@@ -1,11 +1,15 @@
#pragma once
#include "Thresholds.hpp"
+#include "Utils.hpp"
#include "sensor.hpp"
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
#include <chrono>
+#include <functional>
+#include <memory>
#include <string>
#include <vector>
diff --git a/src/fan/PresenceGpio.hpp b/src/fan/PresenceGpio.hpp
index 627270b..ac42638 100644
--- a/src/fan/PresenceGpio.hpp
+++ b/src/fan/PresenceGpio.hpp
@@ -1,10 +1,14 @@
#pragma once
-#include "sensor.hpp"
-
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/posix/stream_descriptor.hpp>
+#include <boost/asio/steady_timer.hpp>
#include <gpiod.hpp>
#include <phosphor-logging/lg2.hpp>
+#include <memory>
+#include <string>
+
class PresenceGpio
{
public:
diff --git a/src/fan/TachSensor.hpp b/src/fan/TachSensor.hpp
index d2ca101..6e22f76 100644
--- a/src/fan/TachSensor.hpp
+++ b/src/fan/TachSensor.hpp
@@ -2,15 +2,19 @@
#include "PresenceGpio.hpp"
#include "Thresholds.hpp"
+#include "Utils.hpp"
#include "sensor.hpp"
+#include <boost/asio/io_context.hpp>
#include <boost/asio/random_access_file.hpp>
+#include <boost/asio/steady_timer.hpp>
#include <boost/container/flat_map.hpp>
-#include <boost/container/flat_set.hpp>
-#include <gpiod.hpp>
#include <phosphor-logging/lg2.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
+#include <array>
+#include <cstddef>
#include <memory>
#include <optional>
#include <string>
diff --git a/src/hwmon-temp/HwmonTempSensor.hpp b/src/hwmon-temp/HwmonTempSensor.hpp
index 7208090..0c27ef9 100644
--- a/src/hwmon-temp/HwmonTempSensor.hpp
+++ b/src/hwmon-temp/HwmonTempSensor.hpp
@@ -2,11 +2,18 @@
#include "DeviceMgmt.hpp"
#include "Thresholds.hpp"
+#include "Utils.hpp"
#include "sensor.hpp"
+#include <boost/asio/io_context.hpp>
#include <boost/asio/random_access_file.hpp>
+#include <boost/asio/steady_timer.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
+#include <array>
+#include <cstddef>
+#include <memory>
#include <string>
#include <vector>
diff --git a/src/intel-cpu/IntelCPUSensor.hpp b/src/intel-cpu/IntelCPUSensor.hpp
index 0c55c6c..73a9f01 100644
--- a/src/intel-cpu/IntelCPUSensor.hpp
+++ b/src/intel-cpu/IntelCPUSensor.hpp
@@ -3,17 +3,22 @@
#include "Thresholds.hpp"
#include "Utils.hpp"
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/posix/stream_descriptor.hpp>
+#include <boost/asio/steady_timer.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/container/flat_map.hpp>
#include <gpiod.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
#include <sensor.hpp>
-#include <filesystem>
-#include <fstream>
+#include <cstddef>
+#include <cstdint>
+#include <iostream>
#include <memory>
-#include <stdexcept>
#include <string>
+#include <system_error>
#include <variant>
#include <vector>
diff --git a/src/intrusion/ChassisIntrusionSensor.hpp b/src/intrusion/ChassisIntrusionSensor.hpp
index 4ccdfdb..b02b903 100644
--- a/src/intrusion/ChassisIntrusionSensor.hpp
+++ b/src/intrusion/ChassisIntrusionSensor.hpp
@@ -1,10 +1,12 @@
#pragma once
#include <boost/asio/io_context.hpp>
+#include <boost/asio/posix/stream_descriptor.hpp>
#include <boost/asio/steady_timer.hpp>
#include <gpiod.hpp>
#include <sdbusplus/asio/object_server.hpp>
+#include <cstddef>
#include <memory>
#include <string>
diff --git a/src/ipmb/IpmbSDRSensor.hpp b/src/ipmb/IpmbSDRSensor.hpp
index 8b0a393..c528698 100644
--- a/src/ipmb/IpmbSDRSensor.hpp
+++ b/src/ipmb/IpmbSDRSensor.hpp
@@ -1,6 +1,13 @@
#pragma once
-#include <sensor.hpp>
+#include <sdbusplus/asio/connection.hpp>
+
+#include <cstdint>
+#include <map>
+#include <memory>
+#include <string>
+#include <tuple>
+#include <vector>
using IpmbMethodType =
std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>;
diff --git a/src/ipmb/IpmbSensor.hpp b/src/ipmb/IpmbSensor.hpp
index 953e44a..c5844cf 100644
--- a/src/ipmb/IpmbSensor.hpp
+++ b/src/ipmb/IpmbSensor.hpp
@@ -1,13 +1,21 @@
#pragma once
+#include "Thresholds.hpp"
+#include "Utils.hpp"
+
+#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/container/flat_map.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+#include <sdbusplus/message.hpp>
#include <sensor.hpp>
-#include <chrono>
-#include <limits>
+#include <cstddef>
+#include <cstdint>
#include <memory>
#include <optional>
#include <string>
+#include <tuple>
#include <vector>
constexpr const char* sensorType = "IpmbSensor";
diff --git a/src/mctp/MCTPDeviceRepository.hpp b/src/mctp/MCTPDeviceRepository.hpp
index 475acbe..6602ea7 100644
--- a/src/mctp/MCTPDeviceRepository.hpp
+++ b/src/mctp/MCTPDeviceRepository.hpp
@@ -2,6 +2,14 @@
#include "MCTPEndpoint.hpp"
+#include <algorithm>
+#include <format>
+#include <map>
+#include <memory>
+#include <optional>
+#include <string>
+#include <system_error>
+
class MCTPDeviceRepository
{
private:
diff --git a/src/mctp/MCTPEndpoint.hpp b/src/mctp/MCTPEndpoint.hpp
index f1b2198..9205eb1 100644
--- a/src/mctp/MCTPEndpoint.hpp
+++ b/src/mctp/MCTPEndpoint.hpp
@@ -2,14 +2,21 @@
#include "Utils.hpp"
-#include <boost/asio/steady_timer.hpp>
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/message.hpp>
#include <sdbusplus/message/native_types.hpp>
#include <cstdint>
-#include <iostream>
+#include <exception>
+#include <functional>
+#include <memory>
+#include <optional>
+#include <set>
+#include <string>
+#include <system_error>
+#include <utility>
+#include <vector>
/**
* @file
diff --git a/src/mctp/MCTPReactor.hpp b/src/mctp/MCTPReactor.hpp
index ca20b45..2030e45 100644
--- a/src/mctp/MCTPReactor.hpp
+++ b/src/mctp/MCTPReactor.hpp
@@ -4,6 +4,11 @@
#include "MCTPEndpoint.hpp"
#include "Utils.hpp"
+#include <cstdint>
+#include <functional>
+#include <memory>
+#include <optional>
+#include <set>
#include <string>
#include <vector>
diff --git a/src/mcu/MCUTempSensor.hpp b/src/mcu/MCUTempSensor.hpp
index 2948af3..9f441df 100644
--- a/src/mcu/MCUTempSensor.hpp
+++ b/src/mcu/MCUTempSensor.hpp
@@ -1,10 +1,13 @@
#pragma once
+#include "Thresholds.hpp"
+
+#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
-#include <boost/container/flat_map.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
#include <sensor.hpp>
-#include <chrono>
-#include <limits>
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/src/nvme/NVMeBasicContext.hpp b/src/nvme/NVMeBasicContext.hpp
index 52b6a09..edf52ec 100644
--- a/src/nvme/NVMeBasicContext.hpp
+++ b/src/nvme/NVMeBasicContext.hpp
@@ -1,10 +1,13 @@
#pragma once
#include "NVMeContext.hpp"
+#include "NVMeSensor.hpp"
#include <boost/asio/io_context.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
+#include <cstddef>
+#include <memory>
#include <thread>
class NVMeBasicContext : public NVMeContext
diff --git a/src/nvme/NVMeContext.hpp b/src/nvme/NVMeContext.hpp
index 4eb81e4..e2ada1b 100644
--- a/src/nvme/NVMeContext.hpp
+++ b/src/nvme/NVMeContext.hpp
@@ -4,9 +4,15 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
+#include <boost/container/flat_map.hpp>
+#include <algorithm>
+#include <cstddef>
+#include <list>
#include <memory>
+#include <optional>
#include <stdexcept>
+#include <string>
class NVMeContext : public std::enable_shared_from_this<NVMeContext>
{
diff --git a/src/nvme/NVMeSensor.hpp b/src/nvme/NVMeSensor.hpp
index a7cfba1..31afbf3 100644
--- a/src/nvme/NVMeSensor.hpp
+++ b/src/nvme/NVMeSensor.hpp
@@ -1,8 +1,17 @@
#pragma once
+#include "Thresholds.hpp"
+
#include <boost/asio/io_context.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
#include <sensor.hpp>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <vector>
+
class NVMeSensor : public Sensor
{
public:
diff --git a/src/psu/PSUEvent.hpp b/src/psu/PSUEvent.hpp
index d761f45..75c89f2 100644
--- a/src/psu/PSUEvent.hpp
+++ b/src/psu/PSUEvent.hpp
@@ -22,9 +22,11 @@
#include <boost/asio/random_access_file.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/container/flat_map.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
#include <array>
+#include <cstddef>
#include <memory>
#include <set>
#include <string>
diff --git a/src/psu/PSUSensor.hpp b/src/psu/PSUSensor.hpp
index 09601f8..0aa2c9e 100644
--- a/src/psu/PSUSensor.hpp
+++ b/src/psu/PSUSensor.hpp
@@ -1,17 +1,22 @@
#pragma once
#include "DeviceMgmt.hpp"
-#include "PwmSensor.hpp"
#include "Thresholds.hpp"
+#include "Utils.hpp"
#include "sensor.hpp"
+#include <boost/asio/io_context.hpp>
#include <boost/asio/random_access_file.hpp>
+#include <boost/asio/steady_timer.hpp>
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
#include <array>
+#include <cstddef>
#include <memory>
#include <string>
#include <utility>
+#include <vector>
class PSUSensor : public Sensor, public std::enable_shared_from_this<PSUSensor>
{
diff --git a/src/sensor.hpp b/src/sensor.hpp
index 82798dc..039635f 100644
--- a/src/sensor.hpp
+++ b/src/sensor.hpp
@@ -6,12 +6,21 @@
#include "Thresholds.hpp"
#include "Utils.hpp"
+#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>
#include <sdbusplus/exception.hpp>
+#include <array>
+#include <cerrno>
+#include <cmath>
+#include <cstddef>
+#include <cstdlib>
+#include <functional>
+#include <iostream>
#include <limits>
#include <memory>
#include <string>
+#include <utility>
#include <vector>
constexpr size_t sensorFailedPollTimeMs = 5000;