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/utils.cpp b/phosphor-ldap-config/utils.cpp
index 66e1474..4ad69d9 100644
--- a/phosphor-ldap-config/utils.cpp
+++ b/phosphor-ldap-config/utils.cpp
@@ -14,7 +14,7 @@
namespace ldap
{
-bool isValidLDAPURI(const std::string& URI, const char* scheme)
+bool isValidLDAPURI(const std::string& uri, const char* scheme)
{
// Return false if the user tries to configure port 0
// This check is not done in line 42, because ldap_url_parse
@@ -22,14 +22,14 @@
// will always return true (thus allowing the user to
// configure port 0)
- if (boost::algorithm::ends_with(URI, ":0"))
+ if (boost::algorithm::ends_with(uri, ":0"))
{
return false;
}
LDAPURLDesc* ludpp = nullptr;
int res = LDAP_URL_ERR_BADURL;
- res = ldap_url_parse(URI.c_str(), &ludpp);
+ res = ldap_url_parse(uri.c_str(), &ludpp);
auto ludppCleanupFunc = [](LDAPURLDesc* ludpp) {
ldap_free_urldesc(ludpp);