Add clang-tidy to phosphor-led-manager
This commit enables clang-tidy and adds few tidy checks.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I3a7b41545fef4c726b56aeab3e4b4000dfcac32f
diff --git a/manager/group.hpp b/manager/group.hpp
index 2febfbb..b6a5251 100644
--- a/manager/group.hpp
+++ b/manager/group.hpp
@@ -30,8 +30,8 @@
~Group() = default;
Group(const Group&) = delete;
Group& operator=(const Group&) = delete;
- Group(Group&&) = default;
- Group& operator=(Group&&) = default;
+ Group(Group&&) = delete;
+ Group& operator=(Group&&) = delete;
/** @brief Constructs LED Group
*
diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index b306e51..8b98fbc 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -219,7 +219,7 @@
fs::create_directories(ledDirectory);
}
- std::ofstream(lampTestIndicator.c_str());
+ std::ofstream ofs(lampTestIndicator.c_str());
// Set all the Physical action to On for lamp test
for (const auto& path : physicalLEDPaths)
diff --git a/manager/lamptest/lamptest.hpp b/manager/lamptest/lamptest.hpp
index 21fd3b5..1d9dd86 100644
--- a/manager/lamptest/lamptest.hpp
+++ b/manager/lamptest/lamptest.hpp
@@ -26,8 +26,8 @@
~LampTest() = default;
LampTest(const LampTest&) = delete;
LampTest& operator=(const LampTest&) = delete;
- LampTest(LampTest&&) = default;
- LampTest& operator=(LampTest&&) = default;
+ LampTest(LampTest&&) = delete;
+ LampTest& operator=(LampTest&&) = delete;
/** @brief Constructs LED LampTest
*