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/include/authorization.hpp b/include/authorization.hpp
index c0a84b6..e32d9ad 100644
--- a/include/authorization.hpp
+++ b/include/authorization.hpp
@@ -37,12 +37,12 @@
#ifdef BMCWEB_ENABLE_BASIC_AUTHENTICATION
static std::shared_ptr<persistent_data::UserSession>
performBasicAuth(const boost::asio::ip::address& clientIp,
- std::string_view auth_header)
+ std::string_view authHeader)
{
BMCWEB_LOG_DEBUG << "[AuthMiddleware] Basic authentication";
std::string authData;
- std::string_view param = auth_header.substr(strlen("Basic "));
+ std::string_view param = authHeader.substr(strlen("Basic "));
if (!crow::utility::base64Decode(param, authData))
{
return nullptr;
@@ -86,11 +86,11 @@
#ifdef BMCWEB_ENABLE_SESSION_AUTHENTICATION
static std::shared_ptr<persistent_data::UserSession>
- performTokenAuth(std::string_view auth_header)
+ performTokenAuth(std::string_view authHeader)
{
BMCWEB_LOG_DEBUG << "[AuthMiddleware] Token authentication";
- std::string_view token = auth_header.substr(strlen("Token "));
+ std::string_view token = authHeader.substr(strlen("Token "));
auto session =
persistent_data::SessionStore::getInstance().loginSessionByToken(token);
return session;
@@ -132,7 +132,7 @@
return nullptr;
}
startIndex += sizeof("SESSION=") - 1;
- auto endIndex = cookieValue.find(";", startIndex);
+ auto endIndex = cookieValue.find(';', startIndex);
if (endIndex == std::string::npos)
{
endIndex = cookieValue.size();