Add misc-include-cleaner
And fix the includes that are wrong.
Note, there is a very large ignore list included in the .clang-tidy
configcfile. These are things that clang-tidy doesn't yet handle
well, like knowing about a details include.
Change-Id: Ie3744f2c8cba68a8700b406449d6c2018a736952
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/test/include/async_resolve_test.cpp b/test/include/async_resolve_test.cpp
index be1e8a3..d07dc1b 100644
--- a/test/include/async_resolve_test.cpp
+++ b/test/include/async_resolve_test.cpp
@@ -2,7 +2,7 @@
#include <boost/asio/ip/tcp.hpp>
-#include <gmock/gmock.h>
+#include <gtest/gtest.h>
TEST(AsyncResolve, ipv4Positive)
{
diff --git a/test/include/credential_pipe_test.cpp b/test/include/credential_pipe_test.cpp
index c5b544b..0c72222 100644
--- a/test/include/credential_pipe_test.cpp
+++ b/test/include/credential_pipe_test.cpp
@@ -1,11 +1,18 @@
#include "credential_pipe.hpp"
+#include <unistd.h>
+
#include <boost/asio/io_context.hpp>
#include <boost/beast/core/file_posix.hpp>
+#include <boost/system/detail/error_code.hpp>
+#include <array>
+#include <cstddef>
+#include <functional>
#include <string>
#include <gmock/gmock.h>
+#include <gtest/gtest.h>
using ::testing::ElementsAre;
diff --git a/test/include/google/google_service_root_test.cpp b/test/include/google/google_service_root_test.cpp
index 88b40d7..daeb657 100644
--- a/test/include/google/google_service_root_test.cpp
+++ b/test/include/google/google_service_root_test.cpp
@@ -1,9 +1,14 @@
#include "async_resp.hpp"
#include "google/google_service_root.hpp"
#include "http_request.hpp"
+#include "http_response.hpp"
+#include <boost/beast/http/verb.hpp>
#include <nlohmann/json.hpp>
+#include <memory>
+#include <system_error>
+
#include <gtest/gtest.h>
namespace crow::google_api
diff --git a/test/include/http_utility_test.cpp b/test/include/http_utility_test.cpp
index 915b168..d2060c1 100644
--- a/test/include/http_utility_test.cpp
+++ b/test/include/http_utility_test.cpp
@@ -1,5 +1,7 @@
#include "http_utility.hpp"
+#include <array>
+
#include <gtest/gtest.h> // IWYU pragma: keep
// IWYU pragma: no_include <gtest/gtest-message.h>
diff --git a/test/include/ibm/lock_test.cpp b/test/include/ibm/lock_test.cpp
index 327ce68..087a84b 100644
--- a/test/include/ibm/lock_test.cpp
+++ b/test/include/ibm/lock_test.cpp
@@ -1,7 +1,6 @@
#include "ibm/locks.hpp"
#include <cstdint>
-#include <memory>
#include <string>
#include <tuple>
#include <utility>
diff --git a/test/include/multipart_test.cpp b/test/include/multipart_test.cpp
index 0ac201f..59e8345 100644
--- a/test/include/multipart_test.cpp
+++ b/test/include/multipart_test.cpp
@@ -2,9 +2,8 @@
#include "multipart_parser.hpp"
#include <boost/beast/http/fields.hpp>
-#include <boost/beast/http/message.hpp>
-#include <memory>
+#include <iterator>
#include <string_view>
#include <system_error>
#include <vector>
diff --git a/test/include/ossl_random.cpp b/test/include/ossl_random.cpp
index 22935e7..512b5c8 100644
--- a/test/include/ossl_random.cpp
+++ b/test/include/ossl_random.cpp
@@ -1,7 +1,5 @@
#include "ossl_random.hpp"
-#include <string>
-
#include <gmock/gmock.h> // IWYU pragma: keep
#include <gtest/gtest.h> // IWYU pragma: keep