add clang-tidy
This commit implements a clang-tidy file, and makes some changes to get
it to pass. Most changes are naming or mechanical in nature.
Tested:
Clang-tidy now passes.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia441e4801b6c8725421d160c531c5df141f255d4
diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
index 9dd8b23..29b8209 100644
--- a/include/CPUSensor.hpp
+++ b/include/CPUSensor.hpp
@@ -1,13 +1,12 @@
#pragma once
-#include "Thresholds.hpp"
-#include "Utils.hpp"
-#include "sensor.hpp"
-
+#include <Thresholds.hpp>
+#include <Utils.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/container/flat_map.hpp>
#include <gpiod.hpp>
#include <sdbusplus/asio/object_server.hpp>
+#include <sensor.hpp>
#include <filesystem>
#include <fstream>
@@ -27,7 +26,7 @@
std::vector<thresholds::Threshold>&& thresholds,
const std::string& configuration, int cpuId, bool show,
double dtsOffset);
- ~CPUSensor();
+ ~CPUSensor() override;
static constexpr unsigned int sensorScaleFactor = 1000;
static constexpr unsigned int sensorPollMs = 1000;
static constexpr size_t warnAfterErrorCount = 10;