Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.
Tested:
Ran clang-tidy-11 and got a clean result.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 71f9430..0cf24ea 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -164,7 +164,7 @@
return;
}
-inline void parseLDAPConfigData(nlohmann::json& json_response,
+inline void parseLDAPConfigData(nlohmann::json& jsonResponse,
const LDAPConfigData& confData,
const std::string& ldapType)
{
@@ -185,9 +185,9 @@
{"GroupsAttribute", confData.groupAttribute}}}}},
};
- json_response[ldapType].update(ldap);
+ jsonResponse[ldapType].update(ldap);
- nlohmann::json& roleMapArray = json_response[ldapType]["RemoteRoleMapping"];
+ nlohmann::json& roleMapArray = jsonResponse[ldapType]["RemoteRoleMapping"];
roleMapArray = nlohmann::json::array();
for (auto& obj : confData.groupRoleList)
{
@@ -402,14 +402,14 @@
}
std::string service = resp.begin()->first;
crow::connections::systemBus->async_method_call(
- [callback, ldapType](const boost::system::error_code error_code,
+ [callback, ldapType](const boost::system::error_code errorCode,
const ManagedObjectType& ldapObjects) {
LDAPConfigData confData{};
- if (error_code)
+ if (errorCode)
{
callback(false, confData, ldapType);
BMCWEB_LOG_ERROR << "D-Bus responses error: "
- << error_code;
+ << errorCode;
return;
}