clang-tidy: enable clang-tidy
Enable the first check: readability-identifier-naming
Also fixed all check failures.
Tested:
1. compiles, no clang-tidy failures
2. the two daemons work correctly on hardware regarding DBus APIs
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ic415e857726e8f521c1d61a3e7f0c85121c0d284
diff --git a/phosphor-ldap-config/ldap_config_mgr.cpp b/phosphor-ldap-config/ldap_config_mgr.cpp
index 87791b8..a359273 100644
--- a/phosphor-ldap-config/ldap_config_mgr.cpp
+++ b/phosphor-ldap-config/ldap_config_mgr.cpp
@@ -14,8 +14,8 @@
constexpr auto nslcdService = "nslcd.service";
constexpr auto nscdService = "nscd.service";
-constexpr auto LDAPscheme = "ldap";
-constexpr auto LDAPSscheme = "ldaps";
+constexpr auto ldapScheme = "ldap";
+constexpr auto ldapsScheme = "ldaps";
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
@@ -84,11 +84,11 @@
{
bool secureLDAP = false;
- if (isValidLDAPURI(ldapServerURI, LDAPSscheme))
+ if (isValidLDAPURI(ldapServerURI, ldapsScheme))
{
secureLDAP = true;
}
- else if (isValidLDAPURI(ldapServerURI, LDAPscheme))
+ else if (isValidLDAPURI(ldapServerURI, ldapScheme))
{
secureLDAP = false;
}
@@ -145,7 +145,7 @@
else
{
ADConfigPtr.reset(nullptr);
- objPath = ADDbusObjectPath;
+ objPath = adDbusObjectPath;
ADConfigPtr = std::make_unique<Config>(
bus, objPath.c_str(), configFilePath.c_str(), tlsCacertFile.c_str(),
tlsCertFile.c_str(), secureLDAP, ldapServerURI, ldapBindDN,
@@ -171,7 +171,7 @@
if (!ADConfigPtr)
{
ADConfigPtr = std::make_unique<Config>(
- bus, ADDbusObjectPath.c_str(), configFilePath.c_str(),
+ bus, adDbusObjectPath.c_str(), configFilePath.c_str(),
tlsCacertFile.c_str(), tlsCertFile.c_str(),
ConfigIface::Type::ActiveDirectory, *this);
ADConfigPtr->emit_object_added();