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/ADCSensor.cpp b/src/ADCSensor.cpp
index fe600d7..646c269 100644
--- a/src/ADCSensor.cpp
+++ b/src/ADCSensor.cpp
@@ -14,10 +14,9 @@
// limitations under the License.
*/
-#include "ADCSensor.hpp"
-
#include <unistd.h>
+#include <ADCSensor.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/asio/read_until.hpp>
@@ -49,13 +48,12 @@
sdbusplus::asio::object_server& objectServer,
std::shared_ptr<sdbusplus::asio::connection>& conn,
boost::asio::io_service& io, const std::string& sensorName,
- std::vector<thresholds::Threshold>&& _thresholds,
+ std::vector<thresholds::Threshold>&& thresholds,
const double scaleFactor, PowerState readState,
const std::string& sensorConfiguration,
std::optional<BridgeGpio>&& bridgeGpio) :
- Sensor(boost::replace_all_copy(sensorName, " ", "_"),
- std::move(_thresholds), sensorConfiguration,
- "xyz.openbmc_project.Configuration.ADC",
+ Sensor(boost::replace_all_copy(sensorName, " ", "_"), std::move(thresholds),
+ sensorConfiguration, "xyz.openbmc_project.Configuration.ADC",
maxVoltageReading / scaleFactor, minVoltageReading / scaleFactor,
conn, readState),
std::enable_shared_from_this<ADCSensor>(), objServer(objectServer),