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/src/ExternalSensor.cpp b/src/ExternalSensor.cpp
index 13e9415..f867151 100644
--- a/src/ExternalSensor.cpp
+++ b/src/ExternalSensor.cpp
@@ -21,16 +21,16 @@
const std::string& objectType, sdbusplus::asio::object_server& objectServer,
std::shared_ptr<sdbusplus::asio::connection>& conn,
const std::string& sensorName, const std::string& sensorUnits,
- std::vector<thresholds::Threshold>&& _thresholds,
+ std::vector<thresholds::Threshold>&& thresholds,
const std::string& sensorConfiguration, const double& maxReading,
const double& minReading, const PowerState& powerState) :
// TODO(): When the Mutable feature is integrated,
// make sure all ExternalSensor instances are mutable,
// because that is the entire point of ExternalSensor,
// to accept sensor values written by an external source.
- Sensor(boost::replace_all_copy(sensorName, " ", "_"),
- std::move(_thresholds), sensorConfiguration, objectType, maxReading,
- minReading, conn, powerState),
+ Sensor(boost::replace_all_copy(sensorName, " ", "_"), std::move(thresholds),
+ sensorConfiguration, objectType, maxReading, minReading, conn,
+ powerState),
std::enable_shared_from_this<ExternalSensor>(), objServer(objectServer)
{
// The caller must specify what physical characteristic