Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.
This includes bringing a bunch of the code up to par with the checks
that require. Most of them fall into the category of extraneous else
statements, const correctness problems, or extra copies.
Tested:
CI only. Unit tests pass.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912
diff --git a/http/http_request.h b/http/http_request.h
index 10aabc3..c3e497f 100644
--- a/http/http_request.h
+++ b/http/http_request.h
@@ -42,37 +42,37 @@
return req.method();
}
- const std::string_view getHeaderValue(std::string_view key) const
+ std::string_view getHeaderValue(std::string_view key) const
{
return req[key];
}
- const std::string_view getHeaderValue(boost::beast::http::field key) const
+ std::string_view getHeaderValue(boost::beast::http::field key) const
{
return req[key];
}
- const std::string_view methodString() const
+ std::string_view methodString() const
{
return req.method_string();
}
- const std::string_view target() const
+ std::string_view target() const
{
return req.target();
}
- unsigned version()
+ unsigned version() const
{
return req.version();
}
- bool isUpgrade()
+ bool isUpgrade() const
{
return boost::beast::websocket::is_upgrade(req);
}
- bool keepAlive()
+ bool keepAlive() const
{
return req.keep_alive();
}