summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-02-26 18:23:27 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-02-26 18:23:27 +0000
commit6b6c7cc173da13e2638caee496fa96061dfb72b3 (patch)
tree4c6296e12626d931e78012fe739e0a3292dafff7
parentFix second round of tools warnings, all but iwyu (diff)
downloadgentoobrowse-api-6b6c7cc173da13e2638caee496fa96061dfb72b3.tar.bz2
gentoobrowse-api-6b6c7cc173da13e2638caee496fa96061dfb72b3.tar.xz
gentoobrowse-api-6b6c7cc173da13e2638caee496fa96061dfb72b3.zip
Fix up all remaining tools warnings in non-generated code
-rw-r--r--Jamroot.jam1
-rw-r--r--gentoobrowse-api/client/main.cpp11
-rw-r--r--gentoobrowse-api/client/search.cpp12
-rw-r--r--gentoobrowse-api/domain/converters.cpp9
-rw-r--r--gentoobrowse-api/domain/converters.h10
-rw-r--r--gentoobrowse-api/domain/unpackPqTextArray.ll6
-rw-r--r--gentoobrowse-api/service/depend.cpp7
-rw-r--r--gentoobrowse-api/service/depend.h2
-rw-r--r--gentoobrowse-api/service/main.cpp19
-rw-r--r--gentoobrowse-api/service/maintenance/abstractFileProcessor.h13
-rw-r--r--gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp11
-rw-r--r--gentoobrowse-api/service/maintenance/categoryMetaProcessor.h7
-rw-r--r--gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp18
-rw-r--r--gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h16
-rw-r--r--gentoobrowse-api/service/maintenance/masksProcessor.cpp17
-rw-r--r--gentoobrowse-api/service/maintenance/masksProcessor.h8
-rw-r--r--gentoobrowse-api/service/maintenance/newsProcessor.cpp9
-rw-r--r--gentoobrowse-api/service/maintenance/newsProcessor.h5
-rw-r--r--gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp11
-rw-r--r--gentoobrowse-api/service/maintenance/packageMetaProcessor.h6
-rw-r--r--gentoobrowse-api/service/maintenance/updatesProcessor.cpp20
-rw-r--r--gentoobrowse-api/service/maintenance/updatesProcessor.h12
-rw-r--r--gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp11
-rw-r--r--gentoobrowse-api/service/maintenance/useGlobalProcessor.h7
-rw-r--r--gentoobrowse-api/service/maintenance/useGroupProcessor.cpp13
-rw-r--r--gentoobrowse-api/service/maintenance/useGroupProcessor.h7
-rw-r--r--gentoobrowse-api/service/maintenance/useLocalProcessor.cpp13
-rw-r--r--gentoobrowse-api/service/maintenance/useLocalProcessor.h7
-rw-r--r--gentoobrowse-api/service/maintenanceBugs.cpp30
-rw-r--r--gentoobrowse-api/service/maintenanceCommon.cpp24
-rw-r--r--gentoobrowse-api/service/maintenanceGitOperations.cpp30
-rw-r--r--gentoobrowse-api/service/mask.cpp2
-rw-r--r--gentoobrowse-api/service/mask.h2
-rw-r--r--gentoobrowse-api/service/news.cpp23
-rw-r--r--gentoobrowse-api/service/news.h6
-rw-r--r--gentoobrowse-api/service/notificationsimpl.cpp5
-rw-r--r--gentoobrowse-api/service/notificationsimpl.h8
-rw-r--r--gentoobrowse-api/service/portageimpl.cpp6
-rw-r--r--gentoobrowse-api/service/portageimpl.h8
-rw-r--r--gentoobrowse-api/service/usersimpl.cpp12
-rw-r--r--gentoobrowse-api/service/usersimpl.h7
-rw-r--r--gentoobrowse-api/service/utils/dbUtils.cpp9
-rw-r--r--gentoobrowse-api/service/utils/dbUtils.h14
-rw-r--r--gentoobrowse-api/service/utils/ebuildCacheParser.cpp3
-rw-r--r--gentoobrowse-api/service/utils/ebuildCacheParser.h7
-rw-r--r--gentoobrowse-api/service/utils/entityWhereFilter.cpp4
-rw-r--r--gentoobrowse-api/service/utils/entityWhereFilter.h7
-rw-r--r--gentoobrowse-api/service/utils/git.cpp4
-rw-r--r--gentoobrowse-api/service/utils/git.h1
-rw-r--r--gentoobrowse-api/service/utils/splitEbuildProps.cpp4
-rw-r--r--gentoobrowse-api/service/utils/splitEbuildProps.h8
-rw-r--r--gentoobrowse-api/service/utils/xmlUtils.cpp3
-rw-r--r--gentoobrowse-api/service/utils/xmlUtils.h1
-rw-r--r--gentoobrowse-api/service/xsltStreamSerializer.cpp15
-rw-r--r--gentoobrowse-api/service/xsltStreamSerializer.h7
-rw-r--r--gentoobrowse-api/unittests/mockDefs.cpp14
-rw-r--r--gentoobrowse-api/unittests/mockDefs.h16
-rw-r--r--gentoobrowse-api/unittests/testBugs.cpp4
-rw-r--r--gentoobrowse-api/unittests/testDepend.cpp7
-rw-r--r--gentoobrowse-api/unittests/testMaintenanceBits.cpp4
-rw-r--r--gentoobrowse-api/unittests/testMasks.cpp14
-rw-r--r--gentoobrowse-api/unittests/testNews.cpp4
-rw-r--r--gentoobrowse-api/unittests/testNotifications.cpp19
-rw-r--r--gentoobrowse-api/unittests/testNotificationsTriggers.cpp15
-rw-r--r--gentoobrowse-api/unittests/testPortage.cpp15
-rw-r--r--gentoobrowse-api/unittests/testProcessAll.cpp12
-rw-r--r--gentoobrowse-api/unittests/testUsers.cpp13
-rw-r--r--gentoobrowse-api/unittests/testUtils.cpp8
-rw-r--r--gentoobrowse-api/util/update.cpp15
-rw-r--r--iwyu.json170
70 files changed, 766 insertions, 102 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index 1bd4766..3ddb43d 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -70,6 +70,7 @@ project
<toolset>tidy:<xcheckxx>hicpp-named-parameter
<toolset>tidy:<xcheckxx>hicpp-no-array-decay
<toolset>tidy:<checkxx>performance-*
+ <toolset>tidy:<mapping>iwyu.json
<toolset>tidy:<librarydef>boost
<toolset>tidy:<librarydef>std
;
diff --git a/gentoobrowse-api/client/main.cpp b/gentoobrowse-api/client/main.cpp
index e82f5a3..4404ecb 100644
--- a/gentoobrowse-api/client/main.cpp
+++ b/gentoobrowse-api/client/main.cpp
@@ -1,9 +1,14 @@
#include "main.h"
-#include <Ice/Ice.h>
+#include "portage.h"
+#include <Ice/Communicator.h>
+#include <Ice/Initialize.h>
+#include <Ice/Proxy.h>
+#include <boost/lexical_cast.hpp>
#include <boost/program_options.hpp>
-#include <cstdio>
+#include <cstdlib>
+#include <iostream>
+#include <memory>
#include <plugins.impl.h>
-#include <portage.h>
namespace po = boost::program_options;
INSTANTIATEPLUGINOF(Module);
diff --git a/gentoobrowse-api/client/search.cpp b/gentoobrowse-api/client/search.cpp
index 5de8d3b..d2c8c69 100644
--- a/gentoobrowse-api/client/search.cpp
+++ b/gentoobrowse-api/client/search.cpp
@@ -1,8 +1,20 @@
+#include "extended-models.h"
#include "helpers.h"
#include "main.h"
+#include "portage-models.h"
+#include "portage.h"
+#include <Ice/Exception.h>
#include <boost/algorithm/string/join.hpp>
+#include <boost/format/alt_sstream.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/optional/optional.hpp>
+#include <cstdio>
#include <fprintbf.h>
+#include <map>
+#include <memory>
#include <plugins.h>
+#include <string>
+#include <vector>
class search : public Module {
public:
diff --git a/gentoobrowse-api/domain/converters.cpp b/gentoobrowse-api/domain/converters.cpp
index 09268b8..e551d9a 100644
--- a/gentoobrowse-api/domain/converters.cpp
+++ b/gentoobrowse-api/domain/converters.cpp
@@ -1,9 +1,10 @@
#include "converters.h"
#include "converters.impl.h"
-#include "unpackPqTextArray.h"
-#include <boost/algorithm/string/join.hpp>
-#include <boost/algorithm/string/split.hpp>
-#include <portage-models.h>
+#include <Ice/Config.h>
+#include <boost/date_time/gregorian/formatters.hpp>
+#include <boost/date_time/gregorian/parsers.hpp>
+#include <slicer/modelParts.h>
+#include <slicer/modelPartsTypes.h>
#include <string>
namespace Slicer {
diff --git a/gentoobrowse-api/domain/converters.h b/gentoobrowse-api/domain/converters.h
index db72c0f..35583e5 100644
--- a/gentoobrowse-api/domain/converters.h
+++ b/gentoobrowse-api/domain/converters.h
@@ -1,14 +1,16 @@
#pragma once
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <portage-models.h>
-#include <slicer/modelPartsTypes.impl.h>
+#include <boost/date_time/posix_time/ptime.hpp>
+#include <slicer/modelParts.h>
+#include <slicer/modelPartsTypes.h>
+#include <string>
+#include <vector>
#include <visibility.h>
namespace Slicer {
template<typename T> class DLL_PUBLIC PqArray : public ModelPartForSequence<std::vector<T>> {
public:
- PqArray(std::vector<T> *);
+ explicit PqArray(std::vector<T> *);
void SetValue(ValueSource &&) override;
bool GetValue(ValueTarget &&) override;
diff --git a/gentoobrowse-api/domain/unpackPqTextArray.ll b/gentoobrowse-api/domain/unpackPqTextArray.ll
index d212d58..d2aca16 100644
--- a/gentoobrowse-api/domain/unpackPqTextArray.ll
+++ b/gentoobrowse-api/domain/unpackPqTextArray.ll
@@ -9,7 +9,10 @@
%{
#include "unpackPqTextArray.h"
-#include <boost/algorithm/string/trim.hpp>
+#include <stdexcept>
+#include <string>
+class pqBaseFlexLexer;
+
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
@@ -79,3 +82,4 @@ namespace Slicer {
}
}
+static_assert(_XOPEN_VERSION);
diff --git a/gentoobrowse-api/service/depend.cpp b/gentoobrowse-api/service/depend.cpp
index c707e82..e2ce15e 100644
--- a/gentoobrowse-api/service/depend.cpp
+++ b/gentoobrowse-api/service/depend.cpp
@@ -1,6 +1,13 @@
#include "depend.h"
+#include "portage-models.h"
#include "wrap/regex.h"
+#include <Ice/Optional.h>
+#include <algorithm>
+#include <functional>
#include <lexer-regex.h>
+#include <memory>
+#include <optional>
+#include <string>
namespace Portage::Utils {
AdHoc::Lexer::PatternPtr WhenUse_Begin(
diff --git a/gentoobrowse-api/service/depend.h b/gentoobrowse-api/service/depend.h
index 7cba039..e6b52c2 100644
--- a/gentoobrowse-api/service/depend.h
+++ b/gentoobrowse-api/service/depend.h
@@ -1,8 +1,8 @@
#pragma once
-#include <istream>
#include <lexer.h>
#include <portage-models.h>
+#include <string_view>
#include <vector>
namespace Portage::Utils {
diff --git a/gentoobrowse-api/service/main.cpp b/gentoobrowse-api/service/main.cpp
index 233aa91..64c826b 100644
--- a/gentoobrowse-api/service/main.cpp
+++ b/gentoobrowse-api/service/main.cpp
@@ -1,16 +1,27 @@
#include "mailServer.h"
+#include "maintenance.h"
#include "maintenanceimpl.h"
+#include "notifications.h"
#include "notificationsimpl.h"
+#include "portage.h"
#include "portageimpl.h"
+#include "users.h"
#include "usersimpl.h"
-#include <Ice/Initialize.h>
+#include "wrap/domparser.h"
+#include <Ice/BuiltinSequences.h>
+#include <Ice/Communicator.h>
+#include <Ice/ObjectAdapter.h>
+#include <Ice/Properties.h>
#include <c++11Helpers.h>
+#include <factory.h>
+#include <git2.h>
#include <icecube.h>
#include <icetrayService.h>
-
-#include <git2.h>
#include <libexslt/exslt.h>
-#include <libxslt/transform.h>
+#include <mail.h>
+#include <memory>
+#include <string>
+#include <xslt.h>
namespace Gentoo::Service {
class Api : public IceTray::Service {
diff --git a/gentoobrowse-api/service/maintenance/abstractFileProcessor.h b/gentoobrowse-api/service/maintenance/abstractFileProcessor.h
index 8cf1fb0..b83b594 100644
--- a/gentoobrowse-api/service/maintenance/abstractFileProcessor.h
+++ b/gentoobrowse-api/service/maintenance/abstractFileProcessor.h
@@ -1,11 +1,18 @@
#pragma once
#include "changeSet.h"
+#include "portage-models.h"
#include <c++11Helpers.h>
-#include <connection.h>
-#include <factory.h>
+#include <cstdint>
+#include <factory.h> // IWYU pragma: keep
#include <filesystem>
-#include <maintenance.h>
+#include <memory>
+#include <string>
+#include <vector>
+// IWYU pragma: no_include "factory.impl.h"
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
using PathParts = std::vector<std::string>;
diff --git a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
index 26874ea..98862c6 100644
--- a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
@@ -1,10 +1,21 @@
#include "categoryMetaProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "utils/dbUtils.h"
#include "utils/xmlUtils.h"
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
+#include <optional>
#include <optionalUtils.h>
+#include <plugins.h>
#include <sql/maintenance/categoryMetaUpdate.sql.h>
+#include <staticSqlSource.h>
+#include <string>
+namespace DB {
+ class Connection;
+}
namespace U = Gentoo::Utils;
using namespace AdHoc;
diff --git a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
index 2dac272..857972e 100644
--- a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
@@ -1,7 +1,12 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "portage-models.h"
+#include <cstdint>
+#include <filesystem>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class CategoryMetaProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
index ea37ea5..11cfcc2 100644
--- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
@@ -1,13 +1,25 @@
#include "ebuildMetaProcessor.h"
#include "depend.h"
+#include "maintenance/abstractFileProcessor.h"
+#include "portage-models.h"
#include "utils/dbUtils.h"
#include "utils/ebuildCacheParser.h"
#include "utils/splitEbuildProps.h"
#include "wrap/regex.h"
+#include "wrap/ustring.h"
+#include <Ice/Optional.h>
#include <boost/algorithm/string/join.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
+#include <command_fwd.h>
+#include <connection.h>
+#include <ext/alloc_traits.h>
+#include <factory.h>
+#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
-#include <optionalUtils.h>
+#include <optional>
+#include <plugins.h>
+#include <selectcommand.h>
#include <selectcommandUtil.impl.h>
#include <sql/maintenance/categoryInsert.sql.h>
#include <sql/maintenance/categoryPrune.sql.h>
@@ -22,7 +34,11 @@
#include <sql/maintenance/packageInsert.sql.h>
#include <sql/maintenance/packagePrune.sql.h>
#include <sqlWriter.h>
+#include <staticSqlSource.h>
#include <tablepatch.h>
+namespace Glib {
+ class Regex;
+}
namespace U = Gentoo::Utils;
using namespace AdHoc;
diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h
index 5d143b3..5f63c62 100644
--- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.h
@@ -1,12 +1,22 @@
#pragma once
#include "abstractFileProcessor.h"
-#include "utils/ebuildCacheParser.h"
+#include "changeSet.h"
#include "utils/entityWhereFilter.h"
-#include <connection.h>
+#include <command_fwd.h>
+#include <cstdint>
#include <filesystem>
-#include <modifycommand.h>
#include <portage-models.h>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+namespace DB {
+ class Connection;
+}
+namespace Gentoo::Utils {
+ class EbuildCacheParser;
+}
namespace Gentoo::Service {
class EbuildMetaProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/masksProcessor.cpp b/gentoobrowse-api/service/maintenance/masksProcessor.cpp
index 573345b..2988e26 100644
--- a/gentoobrowse-api/service/maintenance/masksProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/masksProcessor.cpp
@@ -1,16 +1,28 @@
#include "masksProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "sql/maintenance/masksEbuilds.sql.h"
#include "sql/maintenance/masksFixDates.sql.h"
#include "sql/maintenance/masksSets.sql.h"
#include "utils/dbUtils.h"
-#include "wrap/regex.h"
#include <boost/algorithm/string/join.hpp>
-#include <boost/algorithm/string/trim.hpp>
+#include <command_fwd.h>
+#include <connection.h>
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <list>
+#include <map>
#include <mask.h>
+#include <memory>
#include <modifycommand.h>
+#include <optional>
#include <sqlWriter.h>
+#include <staticSqlSource.h>
+#include <string>
+#include <string_view>
#include <tablepatch.h>
+#include <utility>
+// IWYU pragma: no_include <glib.h>
namespace Gentoo::Service {
unsigned char
@@ -42,7 +54,6 @@ namespace Gentoo::Service {
{{"n", "int"}, {"dateAdded", "date"}, {"person", "text"}, {"email", "text"}, {"message", "text"},
{"atomSpec", "text[]"}});
- auto i = tempTable.second;
AdHoc::FileUtils::MemMap f(path);
class MaskInserter : public Portage::Utils::Masks {
diff --git a/gentoobrowse-api/service/maintenance/masksProcessor.h b/gentoobrowse-api/service/maintenance/masksProcessor.h
index ca3c828..b2e800e 100644
--- a/gentoobrowse-api/service/maintenance/masksProcessor.h
+++ b/gentoobrowse-api/service/maintenance/masksProcessor.h
@@ -1,9 +1,13 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "changeSet.h"
+#include "portage-models.h"
+#include <cstdint>
#include <filesystem>
-#include <modifycommand.h>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class MasksProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/newsProcessor.cpp b/gentoobrowse-api/service/maintenance/newsProcessor.cpp
index b175ba2..95450e2 100644
--- a/gentoobrowse-api/service/maintenance/newsProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/newsProcessor.cpp
@@ -1,12 +1,21 @@
#include "newsProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "news.h"
+#include "portage-models.h"
#include <boost/algorithm/string/predicate.hpp>
#include <db/sqlInsertSerializer.h>
#include <db/sqlUpdateSerializer.h>
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
#include <slicer/slicer.h>
#include <sql/maintenance/newsDelete.sql.h>
+#include <staticSqlSource.h>
+#include <string>
+#include <vector>
+// IWYU pragma: no_include <glib.h>
namespace Gentoo::Service {
unsigned char
diff --git a/gentoobrowse-api/service/maintenance/newsProcessor.h b/gentoobrowse-api/service/maintenance/newsProcessor.h
index b067613..219f858 100644
--- a/gentoobrowse-api/service/maintenance/newsProcessor.h
+++ b/gentoobrowse-api/service/maintenance/newsProcessor.h
@@ -1,9 +1,12 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include <cstdint>
#include <filesystem>
#include <portage-models.h>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class NewsProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
index e27c2d7..a39b5a0 100644
--- a/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
@@ -1,10 +1,21 @@
#include "packageMetaProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "utils/dbUtils.h"
#include "utils/xmlUtils.h"
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
+#include <optional>
#include <optionalUtils.h>
+#include <plugins.h>
#include <sql/maintenance/packageMetaUpdate.sql.h>
+#include <staticSqlSource.h>
+#include <string>
+namespace DB {
+ class Connection;
+}
namespace U = Gentoo::Utils;
using namespace AdHoc;
diff --git a/gentoobrowse-api/service/maintenance/packageMetaProcessor.h b/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
index e5fdfdc..6980079 100644
--- a/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
@@ -1,8 +1,12 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "portage-models.h"
+#include <cstdint>
#include <filesystem>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class PackageMetaProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp
index a12e5f9..b6bcee2 100644
--- a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp
@@ -1,20 +1,34 @@
#include "updatesProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "utils/dbUtils.h"
#include "utils/entityWhereFilter.h"
#include "wrap/regex.h"
-#include <boost/algorithm/string/join.hpp>
-#include <boost/algorithm/string/predicate.hpp>
+#include "wrap/ustring.h"
#include <buffer.h>
#include <c++11Helpers.h>
+#include <command_fwd.h>
+#include <connection.h>
+#include <exception>
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
-#include <fstream>
+#include <memory>
#include <modifycommand.h>
+#include <selectcommand.h>
#include <selectcommandUtil.impl.h>
+#include <set>
#include <sql/maintenance/categoryInsert.sql.h>
#include <sql/maintenance/packageInsert.sql.h>
#include <sql/maintenance/updatesMoveUserPackages.sql.h>
#include <sql/portage/findPackage.sql.h>
+#include <sqlWriter.h>
+#include <staticSqlSource.h>
+#include <string>
#include <tablepatch.h>
+#include <utility>
+namespace Glib {
+ class Regex;
+}
using namespace AdHoc::FileUtils;
diff --git a/gentoobrowse-api/service/maintenance/updatesProcessor.h b/gentoobrowse-api/service/maintenance/updatesProcessor.h
index 0063db7..0ef6872 100644
--- a/gentoobrowse-api/service/maintenance/updatesProcessor.h
+++ b/gentoobrowse-api/service/maintenance/updatesProcessor.h
@@ -1,14 +1,20 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "changeSet.h"
+#include "portage-models.h"
+#include <cstdint>
#include <filesystem>
-#include <modifycommand.h>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class UpdatesPatch;
class UpdatesProcessor : public AbstractFileProcessor {
public:
+ UpdatesProcessor() = default;
+
unsigned char phase() const override;
unsigned char order() const override;
bool match(const PathParts & pp) const override;
@@ -24,6 +30,6 @@ namespace Gentoo::Service {
void tidy(DB::Connection * dbc) override;
private:
- UpdatesPatch * up;
+ UpdatesPatch * up {};
};
}
diff --git a/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp b/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp
index 04408ab..e38da9b 100644
--- a/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/useGlobalProcessor.cpp
@@ -1,9 +1,20 @@
#include "useGlobalProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "utils/dbUtils.h"
#include "wrap/regex.h"
+#include "wrap/ustring.h"
+#include <command_fwd.h>
+#include <connection.h>
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
+#include <string>
#include <tablepatch.h>
+namespace Glib {
+ class Regex;
+}
using namespace AdHoc::FileUtils;
diff --git a/gentoobrowse-api/service/maintenance/useGlobalProcessor.h b/gentoobrowse-api/service/maintenance/useGlobalProcessor.h
index 4577ac2..4fc9a71 100644
--- a/gentoobrowse-api/service/maintenance/useGlobalProcessor.h
+++ b/gentoobrowse-api/service/maintenance/useGlobalProcessor.h
@@ -1,9 +1,12 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "portage-models.h"
+#include <cstdint>
#include <filesystem>
-#include <modifycommand.h>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class UseGlobalProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp b/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp
index 205788a..7f2261d 100644
--- a/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/useGroupProcessor.cpp
@@ -1,15 +1,28 @@
#include "useGroupProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "sql/maintenance/useGroupsDelete.sql.h"
#include "sql/maintenance/useGroupsGetId.sql.h"
#include "sql/maintenance/useGroupsInsert.sql.h"
#include "utils/dbUtils.h"
#include "utils/entityWhereFilter.h"
#include "wrap/regex.h"
+#include "wrap/ustring.h"
#include <boost/algorithm/string/predicate.hpp>
+#include <connection.h>
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
+#include <selectcommand.h>
#include <selectcommandUtil.impl.h>
+#include <set>
+#include <staticSqlSource.h>
+#include <string>
#include <tablepatch.h>
+namespace Glib {
+ class Regex;
+}
namespace U = Gentoo::Utils;
diff --git a/gentoobrowse-api/service/maintenance/useGroupProcessor.h b/gentoobrowse-api/service/maintenance/useGroupProcessor.h
index 71ec083..6d6cb57 100644
--- a/gentoobrowse-api/service/maintenance/useGroupProcessor.h
+++ b/gentoobrowse-api/service/maintenance/useGroupProcessor.h
@@ -1,9 +1,12 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "portage-models.h"
+#include <cstdint>
#include <filesystem>
-#include <modifycommand.h>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class UseGroupProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp b/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp
index 8ea53c5..74932bc 100644
--- a/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp
@@ -1,11 +1,24 @@
#include "useLocalProcessor.h"
+#include "maintenance/abstractFileProcessor.h"
#include "sql/maintenance/useLocalMap.sql.h"
#include "utils/dbUtils.h"
#include "wrap/regex.h"
+#include "wrap/ustring.h"
+#include <command_fwd.h>
+#include <connection.h>
+#include <ext/alloc_traits.h>
+#include <factory.h>
#include <fileUtils.h>
+#include <memory>
#include <modifycommand.h>
#include <sqlWriter.h>
+#include <staticSqlSource.h>
+#include <string>
#include <tablepatch.h>
+#include <utility>
+namespace Glib {
+ class Regex;
+}
using namespace AdHoc::FileUtils;
diff --git a/gentoobrowse-api/service/maintenance/useLocalProcessor.h b/gentoobrowse-api/service/maintenance/useLocalProcessor.h
index 9f808da..9d8b848 100644
--- a/gentoobrowse-api/service/maintenance/useLocalProcessor.h
+++ b/gentoobrowse-api/service/maintenance/useLocalProcessor.h
@@ -1,9 +1,12 @@
#pragma once
#include "abstractFileProcessor.h"
-#include <connection.h>
+#include "portage-models.h"
+#include <cstdint>
#include <filesystem>
-#include <modifycommand.h>
+namespace DB {
+ class Connection;
+}
namespace Gentoo::Service {
class UseLocalProcessor : public AbstractFileProcessor {
diff --git a/gentoobrowse-api/service/maintenanceBugs.cpp b/gentoobrowse-api/service/maintenanceBugs.cpp
index 5023578..b40c130 100644
--- a/gentoobrowse-api/service/maintenanceBugs.cpp
+++ b/gentoobrowse-api/service/maintenanceBugs.cpp
@@ -1,16 +1,40 @@
+#include "command_fwd.h"
+#include "connection.h"
+#include "connectionPool.h"
+#include "logWriter.h"
#include "maintenanceimpl.h"
+#include "resourcePool.impl.h"
+#include "wrap/domparser.h"
+#include "wrap/regex.h"
+#include "wrap/ustring.h"
+#include <Ice/Properties.h>
+#include <boost/core/typeinfo.hpp>
+#include <boost/detail/basic_pointerbuf.hpp>
+#include <boost/iostreams/detail/error.hpp>
+#include <boost/iostreams/detail/streambuf/indirect_streambuf.hpp>
#include <boost/lexical_cast.hpp>
#include <compileTimeFormatter.h>
+#include <cstdint>
+#include <curl/curl.h>
#include <curlStream.h>
+#include <exception>
+#include <filesystem>
+#include <initializer_list>
#include <lexer-regex.h>
-#include <lexer.h>
-#include <libxml++/parsers/saxparser.h>
+#include <libxml++/parsers/saxparser.h> // IWYU pragma: keep
#include <logger.h>
+#include <memory>
+#include <modifycommand.h>
#include <nagios.h>
-#include <selectcommandUtil.impl.h>
#include <stack>
+#include <string>
+#include <string_view>
#include <tablepatch.h>
+#include <utility>
#include <utils/dbUtils.h>
+namespace Ice {
+ struct Current;
+}
namespace Gentoo::Service {
AdHoc::Lexer::PatternPtr bugLink = AdHoc::LexerMatchers::regex(
diff --git a/gentoobrowse-api/service/maintenanceCommon.cpp b/gentoobrowse-api/service/maintenanceCommon.cpp
index e225848..0b8f0b9 100644
--- a/gentoobrowse-api/service/maintenanceCommon.cpp
+++ b/gentoobrowse-api/service/maintenanceCommon.cpp
@@ -1,12 +1,36 @@
+#include "maintenance.h"
#include "maintenanceimpl.h"
+#include "news-models.h"
+#include "portage-models.h"
#include "sql/maintenance/getNotificationEbuildLists.sql.h"
+#include "user-models.h"
#include <Ice/Communicator.h>
+#include <Ice/Current.h>
+#include <Ice/Exception.h>
#include <Ice/ObjectAdapter.h>
+#include <Ice/Properties.h>
+#include <Ice/PropertiesF.h>
+#include <Ice/Proxy.h>
+#include <IceUtil/Handle.h>
+#include <IceUtil/Time.h>
+#include <IceUtil/Timer.h>
+#include <abstractDatabaseClient.h>
+#include <algorithm>
+#include <connectionPool.h>
+#include <future>
#include <icecube.h>
+#include <iterator>
+#include <mail.h>
+#include <map>
+#include <memory>
#include <notifications.h>
#include <portage.h>
#include <safeMapFind.h>
+#include <staticSqlSource.h>
+#include <string>
#include <users.h>
+#include <utility>
+#include <vector>
namespace Gentoo::Service {
class BaseScheduledTask : public IceUtil::TimerTask {
diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp
index ade5c9a..0b4a290 100644
--- a/gentoobrowse-api/service/maintenanceGitOperations.cpp
+++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp
@@ -1,21 +1,45 @@
+#include "changeSet.h"
#include "converters.impl.h"
+#include "maintenance.h"
+#include "maintenance/abstractFileProcessor.h"
#include "maintenanceimpl.h"
+#include "resourcePool.h" // IWYU pragma: keep
+#include "staticSqlSource.h"
#include "utils/git.h"
#include <Ice/Communicator.h>
+#include <Ice/Current.h>
#include <Ice/ObjectAdapter.h>
-#include <boost/lexical_cast.hpp>
+#include <Ice/Properties.h>
+#include <boost/date_time/posix_time/conversion.hpp>
#include <compileTimeFormatter.h>
+#include <connection.h>
+#include <connectionPool.h>
+#include <cstdint>
+#include <ctime>
+#include <exception>
+#include <factory.h>
+#include <filesystem>
+#include <functional>
#include <git2.h>
+#include <logWriter.h>
#include <logger.h>
+#include <map>
+#include <memory>
+#include <modifycommand.h>
#include <nagios.h>
+#include <plugins.h>
#include <portage-models.h>
-#include <selectcommandUtil.impl.h>
+#include <set>
#include <sql/maintenance/changeLogInsert.sql.h>
#include <sql/maintenance/repoSetLastCommit.sql.h>
#include <sql/maintenance/reposToGitRefresh.sql.h>
#include <sql/maintenance/reposToUpdate.sql.h>
+#include <string>
+#include <string_view>
#include <systemd/sd-daemon.h>
-#include <utils/dbUtils.h>
+#include <utility>
+#include <vector>
+// IWYU pragma: no_include "resourcePool.impl.h"
namespace Gentoo::Service {
using namespace Utils::Git;
diff --git a/gentoobrowse-api/service/mask.cpp b/gentoobrowse-api/service/mask.cpp
index 6dabb41..fddb470 100644
--- a/gentoobrowse-api/service/mask.cpp
+++ b/gentoobrowse-api/service/mask.cpp
@@ -1,3 +1,5 @@
+#include "wrap/regex.h"
+#include <functional>
#include <lexer-regex.h>
#include <mask.h>
diff --git a/gentoobrowse-api/service/mask.h b/gentoobrowse-api/service/mask.h
index 08f534b..195ef72 100644
--- a/gentoobrowse-api/service/mask.h
+++ b/gentoobrowse-api/service/mask.h
@@ -5,6 +5,8 @@
#include <lexer.h>
#include <list>
#include <optional>
+#include <set>
+#include <string>
namespace Portage::Utils {
class Masks : public AdHoc::Lexer {
diff --git a/gentoobrowse-api/service/news.cpp b/gentoobrowse-api/service/news.cpp
index 1690959..3468964 100644
--- a/gentoobrowse-api/service/news.cpp
+++ b/gentoobrowse-api/service/news.cpp
@@ -1,6 +1,13 @@
#include "news.h"
-#include <boost/algorithm/string/split.hpp>
+#include "wrap/regex.h"
+#include <Ice/Optional.h>
+#include <algorithm>
+#include <functional>
#include <lexer-regex.h>
+#include <memory>
+#include <optional>
+#include <string>
+#include <vector>
namespace Portage::Utils {
AdHoc::Lexer::PatternPtr Title(AdHoc::LexerMatchers::regex(
@@ -32,20 +39,6 @@ namespace Portage::Utils {
return Ice::optional<T>();
}
- template<typename T, typename Y>
- std::vector<T>
- split(const std::optional<Y> & x)
- {
- std::vector<T> rtn;
- if (x) {
- boost::algorithm::split(rtn, *x, [](auto c) {
- return c == ',';
- });
- std::sort(rtn.begin(), rtn.end());
- }
- return rtn;
- }
-
News::News() :
AdHoc::Lexer({// title: words
{{InitialState}, Title,
diff --git a/gentoobrowse-api/service/news.h b/gentoobrowse-api/service/news.h
index d13263c..0610675 100644
--- a/gentoobrowse-api/service/news.h
+++ b/gentoobrowse-api/service/news.h
@@ -1,9 +1,9 @@
#pragma once
-#include <istream>
+#include "portage-models.h"
#include <lexer.h>
-#include <portage-models.h>
-#include <vector>
+#include <string_view>
+// IWYU pragma: no_include <glib.h>
namespace Portage::Utils {
class News : AdHoc::Lexer {
diff --git a/gentoobrowse-api/service/notificationsimpl.cpp b/gentoobrowse-api/service/notificationsimpl.cpp
index 71b2a78..33bbfdf 100644
--- a/gentoobrowse-api/service/notificationsimpl.cpp
+++ b/gentoobrowse-api/service/notificationsimpl.cpp
@@ -1,11 +1,12 @@
#include "notificationsimpl.h"
+#include "wrap/domparser.h"
#include "xsltStreamSerializer.h"
-#include <cstring>
-#include <libxml/parser.h>
+#include <documents.h>
#include <notifications/xslt/base.h>
#include <notifications/xslt/news.h>
#include <notifications/xslt/signup.h>
#include <slicer/slicer.h>
+#include <xsltInternals.h>
#define BADCAST(str) reinterpret_cast<const unsigned char *>(str)
diff --git a/gentoobrowse-api/service/notificationsimpl.h b/gentoobrowse-api/service/notificationsimpl.h
index afad26e..2cc6935 100644
--- a/gentoobrowse-api/service/notificationsimpl.h
+++ b/gentoobrowse-api/service/notificationsimpl.h
@@ -1,10 +1,16 @@
#ifndef NOTIFICATIONSIMPL_H
#define NOTIFICATIONSIMPL_H
-#include <libxslt/documents.h>
+#include "mail.h"
+#include "user-models.h"
#include <memory>
#include <notifications.h>
+#include <string>
#include <visibility.h>
+#include <xsltInternals.h>
+namespace Gentoo {
+ struct NewsContent;
+}
namespace Gentoo::Service {
class DLL_PUBLIC Notifications : public Gentoo::Notifications {
diff --git a/gentoobrowse-api/service/portageimpl.cpp b/gentoobrowse-api/service/portageimpl.cpp
index 452de86..6619037 100644
--- a/gentoobrowse-api/service/portageimpl.cpp
+++ b/gentoobrowse-api/service/portageimpl.cpp
@@ -1,4 +1,7 @@
#include "portageimpl.h"
+#include <abstractCachingDatabaseClient.h>
+#include <connectionPool.h>
+#include <memory>
#include <sql/portage/findCategory.sql.h>
#include <sql/portage/findPackage.sql.h>
#include <sql/portage/getAllCategories.sql.h>
@@ -41,6 +44,9 @@
#include <sql/portage/getUserTrackedPackages.sql.h>
#include <sql/portage/getUserTrackedRecentVersions.sql.h>
#include <sql/portage/getUsesSearch.sql.h>
+#include <staticSqlSource.h>
+#include <string>
+#include <vector>
namespace Gentoo::Service {
Portage::Portage(const DB::ConnectionPoolPtr & d) : IceTray::AbstractCachingDatabaseClient(d) { }
diff --git a/gentoobrowse-api/service/portageimpl.h b/gentoobrowse-api/service/portageimpl.h
index b4b2dfe..4bc5963 100644
--- a/gentoobrowse-api/service/portageimpl.h
+++ b/gentoobrowse-api/service/portageimpl.h
@@ -1,9 +1,17 @@
#ifndef PORTAGEIMPL_H
#define PORTAGEIMPL_H
+#include "extended-models.h"
+#include "portage-models.h"
+#include <Ice/Config.h>
#include <abstractCachingDatabaseClient.h>
+#include <connectionPool.h>
#include <portage.h>
+#include <string_view>
#include <visibility.h>
+namespace Ice {
+ struct Current;
+}
namespace Gentoo::Service {
class DLL_PUBLIC Portage : public Gentoo::Portage, IceTray::AbstractCachingDatabaseClient {
diff --git a/gentoobrowse-api/service/usersimpl.cpp b/gentoobrowse-api/service/usersimpl.cpp
index a95e22b..082f802 100644
--- a/gentoobrowse-api/service/usersimpl.cpp
+++ b/gentoobrowse-api/service/usersimpl.cpp
@@ -1,9 +1,19 @@
#include "usersimpl.h"
+#include "users.h"
#include <Ice/Communicator.h>
+#include <Ice/Current.h>
#include <Ice/ObjectAdapter.h>
+#include <Ice/Optional.h>
+#include <Ice/Properties.h>
+#include <abstractCachingDatabaseClient.h>
+#include <connection.h>
+#include <connectionPool.h>
#include <icecube.h>
+#include <mail.h>
+#include <memory>
#include <modifycommand.h>
#include <notifications.h>
+#include <resourcePool.h> // IWYU pragma: keep
#include <sql/users/authenticate.sql.h>
#include <sql/users/create.sql.h>
#include <sql/users/find.sql.h>
@@ -16,6 +26,8 @@
#include <sql/users/tracked.sql.h>
#include <sql/users/untrack.sql.h>
#include <sql/users/verify.sql.h>
+#include <staticSqlSource.h>
+// IWYU pragma: no_include "resourcePool.impl.h"
namespace Gentoo::Service {
Users::Users(const DB::ConnectionPoolPtr & d) : IceTray::AbstractCachingDatabaseClient(d) { }
diff --git a/gentoobrowse-api/service/usersimpl.h b/gentoobrowse-api/service/usersimpl.h
index 75d1644..64b610b 100644
--- a/gentoobrowse-api/service/usersimpl.h
+++ b/gentoobrowse-api/service/usersimpl.h
@@ -1,9 +1,16 @@
#ifndef USERSIMPL_H
#define USERSIMPL_H
+#include "user-models.h"
+#include <Ice/Config.h>
#include <abstractCachingDatabaseClient.h>
+#include <connectionPool.h>
+#include <string_view>
#include <users.h>
#include <visibility.h>
+namespace Ice {
+ struct Current;
+}
namespace Gentoo::Service {
class DLL_PUBLIC Users : public Gentoo::Users, IceTray::AbstractCachingDatabaseClient {
diff --git a/gentoobrowse-api/service/utils/dbUtils.cpp b/gentoobrowse-api/service/utils/dbUtils.cpp
index d0ae626..d08307a 100644
--- a/gentoobrowse-api/service/utils/dbUtils.cpp
+++ b/gentoobrowse-api/service/utils/dbUtils.cpp
@@ -1,9 +1,10 @@
#include "dbUtils.h"
-#include <atomic>
#include <boost/algorithm/string/join.hpp>
-#include <boost/lexical_cast.hpp>
-#include <buffer.h>
+#include <compileTimeFormatter.h>
+#include <connection.h>
#include <tablepatch.h>
+#include <unistd.h>
+#include <vector>
namespace Gentoo::Utils::Database {
std::string
@@ -14,7 +15,7 @@ namespace Gentoo::Utils::Database {
if (dot != std::string::npos) {
tempTable = tempTable.substr(dot + 1);
}
- tempTable += "_clone_" + boost::lexical_cast<std::string>(db);
+ tempTable += AdHoc::scprintf<"_clone_%?%?">(getpid(), db);
db->execute("CREATE TEMPORARY TABLE " + tempTable + " AS SELECT * FROM " + orig + " WHERE false");
return tempTable;
}
diff --git a/gentoobrowse-api/service/utils/dbUtils.h b/gentoobrowse-api/service/utils/dbUtils.h
index dee1b2d..8a691b6 100644
--- a/gentoobrowse-api/service/utils/dbUtils.h
+++ b/gentoobrowse-api/service/utils/dbUtils.h
@@ -1,10 +1,14 @@
#pragma once
-#include <IceUtil/Exception.h>
-#include <IceUtil/Optional.h>
-#include <command.h>
-#include <connection.h>
-#include <modifycommand.h>
+#include "command_fwd.h"
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+namespace DB {
+ class Connection;
+ class TablePatch;
+}
namespace Gentoo::Utils::Database {
std::string emptyClone(DB::Connection *, const std::string &);
diff --git a/gentoobrowse-api/service/utils/ebuildCacheParser.cpp b/gentoobrowse-api/service/utils/ebuildCacheParser.cpp
index c3fef41..a34f807 100644
--- a/gentoobrowse-api/service/utils/ebuildCacheParser.cpp
+++ b/gentoobrowse-api/service/utils/ebuildCacheParser.cpp
@@ -1,4 +1,7 @@
#include "ebuildCacheParser.h"
+#include "wrap/ustring.h"
+#include <fileUtils.h>
+#include <utility>
namespace Gentoo::Utils {
EbuildCacheParser::EbuildCacheParser(const std::filesystem::path & p) : AdHoc::FileUtils::MemMap(p)
diff --git a/gentoobrowse-api/service/utils/ebuildCacheParser.h b/gentoobrowse-api/service/utils/ebuildCacheParser.h
index ee3977f..c36030e 100644
--- a/gentoobrowse-api/service/utils/ebuildCacheParser.h
+++ b/gentoobrowse-api/service/utils/ebuildCacheParser.h
@@ -1,11 +1,14 @@
#pragma once
-#include "wrap/ustring.h"
#include <fileUtils.h>
-#include <filesystem>
+#include <functional>
#include <map>
#include <optional>
+#include <string>
#include <string_view>
+namespace Glib {
+ class ustring;
+}
namespace Gentoo::Utils {
class EbuildCacheParser : public AdHoc::FileUtils::MemMap {
diff --git a/gentoobrowse-api/service/utils/entityWhereFilter.cpp b/gentoobrowse-api/service/utils/entityWhereFilter.cpp
index be74f2e..68ad09d 100644
--- a/gentoobrowse-api/service/utils/entityWhereFilter.cpp
+++ b/gentoobrowse-api/service/utils/entityWhereFilter.cpp
@@ -1,6 +1,10 @@
#include "entityWhereFilter.h"
+#include <boost/format/alt_sstream.hpp>
+#include <boost/optional/optional.hpp>
#include <buffer.h>
#include <command.h>
+#include <cstdint>
+#include <utility>
namespace Gentoo::Utils {
template<typename T> EntityWhereFilter<T>::EntityWhereFilter(std::string en) : entityColName(std::move(en)) { }
diff --git a/gentoobrowse-api/service/utils/entityWhereFilter.h b/gentoobrowse-api/service/utils/entityWhereFilter.h
index ccb92a0..d01ca82 100644
--- a/gentoobrowse-api/service/utils/entityWhereFilter.h
+++ b/gentoobrowse-api/service/utils/entityWhereFilter.h
@@ -2,6 +2,13 @@
#include <set>
#include <sqlWriter.h>
+#include <string>
+namespace AdHoc {
+ class Buffer;
+}
+namespace DB {
+ class Command;
+}
namespace Gentoo::Utils {
template<typename T> class EntityWhereFilter : public DB::SqlWriter {
diff --git a/gentoobrowse-api/service/utils/git.cpp b/gentoobrowse-api/service/utils/git.cpp
index c2e94b7..2e1a3eb 100644
--- a/gentoobrowse-api/service/utils/git.cpp
+++ b/gentoobrowse-api/service/utils/git.cpp
@@ -1,6 +1,10 @@
#include "git.h"
+#include <array>
+#include <cassert>
#include <compileTimeFormatter.h>
+#include <cstdlib>
#include <execinfo.h>
+#include <logWriter.h>
#include <logger.h>
#include <maintenance.h>
diff --git a/gentoobrowse-api/service/utils/git.h b/gentoobrowse-api/service/utils/git.h
index d240b51..27bf33b 100644
--- a/gentoobrowse-api/service/utils/git.h
+++ b/gentoobrowse-api/service/utils/git.h
@@ -3,6 +3,7 @@
#include <git2.h>
#include <memory>
#include <ostream>
+#include <string>
namespace Gentoo::Utils::Git {
void throwError(void * const func, int err);
diff --git a/gentoobrowse-api/service/utils/splitEbuildProps.cpp b/gentoobrowse-api/service/utils/splitEbuildProps.cpp
index f9e1b6e..b97586d 100644
--- a/gentoobrowse-api/service/utils/splitEbuildProps.cpp
+++ b/gentoobrowse-api/service/utils/splitEbuildProps.cpp
@@ -1,7 +1,9 @@
#include "splitEbuildProps.h"
-#include "dbUtils.h"
+#include <boost/format/alt_sstream.hpp>
+#include <boost/optional/optional.hpp>
#include <buffer.h>
#include <command.h>
+#include <utility>
namespace Gentoo::Utils {
SplitEbuildProps::SplitEbuildProps(std::string ce, int64_t e, std::string cp, std::optional<Glib::ustring> p) :
diff --git a/gentoobrowse-api/service/utils/splitEbuildProps.h b/gentoobrowse-api/service/utils/splitEbuildProps.h
index c413a51..9020c22 100644
--- a/gentoobrowse-api/service/utils/splitEbuildProps.h
+++ b/gentoobrowse-api/service/utils/splitEbuildProps.h
@@ -1,8 +1,16 @@
#pragma once
#include "wrap/ustring.h"
+#include <cstdint>
#include <optional>
#include <sqlWriter.h>
+#include <string>
+namespace AdHoc {
+ class Buffer;
+}
+namespace DB {
+ class Command;
+}
namespace Gentoo::Utils {
class SplitEbuildProps : public DB::SqlWriter {
diff --git a/gentoobrowse-api/service/utils/xmlUtils.cpp b/gentoobrowse-api/service/utils/xmlUtils.cpp
index 195b054..efb8cbd 100644
--- a/gentoobrowse-api/service/utils/xmlUtils.cpp
+++ b/gentoobrowse-api/service/utils/xmlUtils.cpp
@@ -1,4 +1,7 @@
#include "xmlUtils.h"
+#include "wrap/ustring.h"
+#include <stdexcept>
+#include <vector>
namespace Gentoo::Utils {
XmlDoc::XmlDoc(const std::filesystem::path & path) : xmlpp::DomParser(path) { }
diff --git a/gentoobrowse-api/service/utils/xmlUtils.h b/gentoobrowse-api/service/utils/xmlUtils.h
index 0e44a73..0ca6039 100644
--- a/gentoobrowse-api/service/utils/xmlUtils.h
+++ b/gentoobrowse-api/service/utils/xmlUtils.h
@@ -1,6 +1,7 @@
#pragma once
#include "wrap/domparser.h"
+#include "wrap/ustring.h"
#include <filesystem>
#include <optional>
diff --git a/gentoobrowse-api/service/xsltStreamSerializer.cpp b/gentoobrowse-api/service/xsltStreamSerializer.cpp
index 90dff01..cebae7b 100644
--- a/gentoobrowse-api/service/xsltStreamSerializer.cpp
+++ b/gentoobrowse-api/service/xsltStreamSerializer.cpp
@@ -1,12 +1,21 @@
#include "xsltStreamSerializer.h"
-#include <factory.impl.h>
-#include <libxml++/document.h>
-#include <libxml/HTMLtree.h>
+#include "xml/serializer.h"
+#include <array>
+#include <cstdio>
+#include <libxml/HTMLtree.h> // IWYU pragma: keep
+#include <libxslt/transform.h>
#include <libxslt/xsltInternals.h>
+#include <memory>
#include <mimeImpl.h>
#include <notifications/css/style.h>
+#include <ostream>
#include <processPipes.h>
+#include <stdexcept>
+#include <string>
#include <sys/wait.h>
+#include <unistd.h>
+#include <utility>
+#include <vector>
namespace Gentoo {
using namespace IceTray::Mime;
diff --git a/gentoobrowse-api/service/xsltStreamSerializer.h b/gentoobrowse-api/service/xsltStreamSerializer.h
index 9076a3f..f13f774 100644
--- a/gentoobrowse-api/service/xsltStreamSerializer.h
+++ b/gentoobrowse-api/service/xsltStreamSerializer.h
@@ -1,11 +1,14 @@
#ifndef ICESPIDER_CORE_XSLTSTREAMSERIALIZER_H
#define ICESPIDER_CORE_XSLTSTREAMSERIALIZER_H
+#include "mail.h"
+#include "mime.h"
+#include "modelParts.h"
+#include "wrap/domparser.h"
#include <c++11Helpers.h>
-#include <libxslt/transform.h>
-#include <notifications.h>
#include <slicer/xml/serializer.h>
#include <visibility.h>
+#include <xsltInternals.h>
namespace Gentoo {
class DLL_PUBLIC XsltStreamSerializer : public Slicer::XmlDocumentSerializer {
diff --git a/gentoobrowse-api/unittests/mockDefs.cpp b/gentoobrowse-api/unittests/mockDefs.cpp
index 02ce761..1d4018e 100644
--- a/gentoobrowse-api/unittests/mockDefs.cpp
+++ b/gentoobrowse-api/unittests/mockDefs.cpp
@@ -1,9 +1,23 @@
#include "mockDefs.h"
+#include "maintenance.h"
+#include "portage.h"
+#include "users.h"
+#include <Ice/Proxy.h>
+#include <cstdio>
#include <definedDirs.h>
+#include <dryice.h>
+#include <filesystem>
#include <fstream>
#include <icecube.h>
+#include <mail.h>
+#include <mime.h>
+#include <mimeImpl.h>
+#include <mockDatabase.h>
#include <mockMailServer.h>
#include <notifications.h>
+#include <plugins.h>
+#include <pq-mock.h>
+#include <string>
#include <tidy.h>
DbAlias::DbAlias()
diff --git a/gentoobrowse-api/unittests/mockDefs.h b/gentoobrowse-api/unittests/mockDefs.h
index d965a94..963112b 100644
--- a/gentoobrowse-api/unittests/mockDefs.h
+++ b/gentoobrowse-api/unittests/mockDefs.h
@@ -1,16 +1,28 @@
#ifndef MOCKDEFS_H
#define MOCKDEFS_H
+#include <array>
#include <boost/test/unit_test.hpp>
+#include <command_fwd.h>
+#include <connection.h>
+#include <connection_fwd.h>
#include <dryice.h>
+#include <mail.h>
#include <maintenance.h>
-#include <mimeImpl.h>
+#include <memory>
+#include <mockDatabase.h>
#include <notifications.h>
#include <portage.h>
-#include <pq-mock.h>
#include <selectcommandUtil.impl.h>
+#include <string_view>
#include <users.h>
#include <visibility.h>
+namespace IceTray::Mime {
+ class TextPart;
+}
+namespace PQ {
+ class Mock;
+}
class DLL_PUBLIC DbAlias {
public:
diff --git a/gentoobrowse-api/unittests/testBugs.cpp b/gentoobrowse-api/unittests/testBugs.cpp
index a9c08e0..1ddd238 100644
--- a/gentoobrowse-api/unittests/testBugs.cpp
+++ b/gentoobrowse-api/unittests/testBugs.cpp
@@ -1,7 +1,11 @@
#define BOOST_TEST_MODULE TestBugs
#include <boost/test/unit_test.hpp>
+#include "maintenance.h"
#include "mockDefs.h"
+#include <cstdint>
+#include <memory>
+#include <mockDatabase.h>
BOOST_GLOBAL_FIXTURE(Maintenance);
diff --git a/gentoobrowse-api/unittests/testDepend.cpp b/gentoobrowse-api/unittests/testDepend.cpp
index 73cf3bc..0ac212b 100644
--- a/gentoobrowse-api/unittests/testDepend.cpp
+++ b/gentoobrowse-api/unittests/testDepend.cpp
@@ -1,7 +1,12 @@
#define BOOST_TEST_MODULE TestDepend
#include <boost/test/unit_test.hpp>
-#include <depend.h>
+#include "depend.h"
+#include "portage-models.h" // for Dependency, StringList
+#include <Ice/Optional.h> // for optional
+#include <ext/alloc_traits.h> // for __alloc_traits<>::valu...
+#include <memory> // for __shared_ptr_access
+#include <vector> // for vector
BOOST_AUTO_TEST_CASE(simple1)
{
diff --git a/gentoobrowse-api/unittests/testMaintenanceBits.cpp b/gentoobrowse-api/unittests/testMaintenanceBits.cpp
index 9c16f74..f510148 100644
--- a/gentoobrowse-api/unittests/testMaintenanceBits.cpp
+++ b/gentoobrowse-api/unittests/testMaintenanceBits.cpp
@@ -1,7 +1,9 @@
#define BOOST_TEST_MODULE TestMaintenanceBits
#include <boost/test/unit_test.hpp>
-#include <maintenance/abstractFileProcessor.h>
+#include "maintenance/abstractFileProcessor.h"
+#include <filesystem>
+#include <string>
BOOST_AUTO_TEST_CASE(match)
{
diff --git a/gentoobrowse-api/unittests/testMasks.cpp b/gentoobrowse-api/unittests/testMasks.cpp
index 055c83e..d45e6f1 100644
--- a/gentoobrowse-api/unittests/testMasks.cpp
+++ b/gentoobrowse-api/unittests/testMasks.cpp
@@ -1,12 +1,24 @@
#define BOOST_TEST_MODULE Masks
#include <boost/test/unit_test.hpp>
+#include "wrap/ustring.h"
+#include <Ice/Optional.h>
#include <boost/algorithm/string/join.hpp>
-#include <compileTimeFormatter.h>
+#include <boost/test/unit_test_suite.hpp>
+#include <cstring>
#include <definedDirs.h>
+#include <ext/alloc_traits.h>
#include <fileUtils.h>
+#include <initializer_list>
+#include <list>
#include <mask.h>
+#include <memory>
+#include <optional>
#include <portage-models.h>
+#include <set>
+#include <string>
+#include <string_view>
+// IWYU pragma: no_include <glib.h>
class MaskTester : public Portage::Utils::Masks {
protected:
diff --git a/gentoobrowse-api/unittests/testNews.cpp b/gentoobrowse-api/unittests/testNews.cpp
index b8944ae..4ac80ae 100644
--- a/gentoobrowse-api/unittests/testNews.cpp
+++ b/gentoobrowse-api/unittests/testNews.cpp
@@ -1,9 +1,13 @@
#define BOOST_TEST_MODULE TestNews
#include <boost/test/unit_test.hpp>
+#include "portage-models.h"
+#include <Ice/Optional.h>
#include <definedDirs.h>
#include <fileUtils.h>
+#include <memory>
#include <news.h>
+#include <vector>
BOOST_AUTO_TEST_CASE(news_2016_04_07_kde_plasma5_stable)
{
diff --git a/gentoobrowse-api/unittests/testNotifications.cpp b/gentoobrowse-api/unittests/testNotifications.cpp
index ff5bbc3..5c72d15 100644
--- a/gentoobrowse-api/unittests/testNotifications.cpp
+++ b/gentoobrowse-api/unittests/testNotifications.cpp
@@ -1,13 +1,24 @@
#define BOOST_TEST_MODULE TestNotifications
-#include <boost/test/data/test_case.hpp>
#include <boost/test/unit_test.hpp>
#include "mockDefs.h"
-#include <definedDirs.h>
-#include <fstream>
-#include <memstream.h>
+#include "news-models.h"
+#include "notifications.h"
+#include "portage-models.h"
+#include "user-models.h"
+#include <Ice/Optional.h>
+#include <array>
+#include <initializer_list>
+#include <mail.h>
+#include <memory>
+#include <mime.h>
#include <mimeImpl.h>
#include <regex>
+#include <sstream>
+#include <string>
+#include <string_view>
+#include <tuple>
+#include <vector>
using namespace std::string_literals;
using QPTD = std::tuple<std::string_view, std::string_view>;
diff --git a/gentoobrowse-api/unittests/testNotificationsTriggers.cpp b/gentoobrowse-api/unittests/testNotificationsTriggers.cpp
index 993b7a0..db53041 100644
--- a/gentoobrowse-api/unittests/testNotificationsTriggers.cpp
+++ b/gentoobrowse-api/unittests/testNotificationsTriggers.cpp
@@ -1,8 +1,21 @@
#define BOOST_TEST_MODULE TestNotificationsTriggers
#include <boost/test/unit_test.hpp>
+#include "maintenance.h"
#include "mockDefs.h"
-#include <mockMailServer.h>
+#include "news-models.h"
+#include "portage-models.h"
+#include "user-models.h"
+#include "users.h"
+#include <Ice/Optional.h>
+#include <algorithm>
+#include <ext/alloc_traits.h>
+#include <mail.h>
+#include <map>
+#include <memory>
+#include <mockMail.h>
+#include <utility>
+#include <vector>
BOOST_GLOBAL_FIXTURE(Service);
diff --git a/gentoobrowse-api/unittests/testPortage.cpp b/gentoobrowse-api/unittests/testPortage.cpp
index ada192d..c6b3cb4 100644
--- a/gentoobrowse-api/unittests/testPortage.cpp
+++ b/gentoobrowse-api/unittests/testPortage.cpp
@@ -1,7 +1,22 @@
#define BOOST_TEST_MODULE TestPortage
#include <boost/test/unit_test.hpp>
+#include "extended-models.h"
#include "mockDefs.h"
+#include "portage-models.h"
+#include "portage.h"
+#include <Ice/Optional.h>
+#include <ext/alloc_traits.h>
+#include <iterator>
+#include <map>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <utility>
+#include <vector>
+namespace Slicer {
+ class NoRowsReturned;
+}
BOOST_GLOBAL_FIXTURE(Service);
diff --git a/gentoobrowse-api/unittests/testProcessAll.cpp b/gentoobrowse-api/unittests/testProcessAll.cpp
index 32f0b70..1074018 100644
--- a/gentoobrowse-api/unittests/testProcessAll.cpp
+++ b/gentoobrowse-api/unittests/testProcessAll.cpp
@@ -2,10 +2,20 @@
#include <boost/test/data/test_case.hpp>
#include <boost/test/unit_test.hpp>
+#include "fileUtils.h"
+#include "portage-models.h"
+#include <Ice/Optional.h>
+#include <algorithm>
#include <depend.h>
-#include <filesystem>
+#include <iterator>
+#include <memory>
#include <news.h>
+#include <optional>
+#include <string>
+#include <string_view>
#include <utils/ebuildCacheParser.h>
+#include <vector>
+// IWYU pragma: no_include <glib.h>
void
testDependRange(const std::optional<std::string_view> & r)
diff --git a/gentoobrowse-api/unittests/testUsers.cpp b/gentoobrowse-api/unittests/testUsers.cpp
index 51ddb08..1b74006 100644
--- a/gentoobrowse-api/unittests/testUsers.cpp
+++ b/gentoobrowse-api/unittests/testUsers.cpp
@@ -2,7 +2,20 @@
#include <boost/test/unit_test.hpp>
#include "mockDefs.h"
+#include "user-models.h"
+#include "users.h"
+#include <Ice/Optional.h>
+#include <ext/alloc_traits.h>
+#include <icecube.h>
+#include <mail.h>
+#include <memory>
+#include <mockMail.h>
#include <mockMailServer.h>
+#include <string>
+#include <vector>
+namespace Slicer {
+ class NoRowsReturned;
+}
BOOST_GLOBAL_FIXTURE(Service);
diff --git a/gentoobrowse-api/unittests/testUtils.cpp b/gentoobrowse-api/unittests/testUtils.cpp
index 8bf8ed2..7302f7b 100644
--- a/gentoobrowse-api/unittests/testUtils.cpp
+++ b/gentoobrowse-api/unittests/testUtils.cpp
@@ -1,9 +1,15 @@
#define BOOST_TEST_MODULE TestDepend
#include <boost/test/unit_test.hpp>
+#include "wrap/domparser.h"
+#include "wrap/ustring.h"
#include <definedDirs.h>
-#include <libxml/parser.h>
+#include <filesystem>
+#include <git2.h>
+#include <libxml/parser.h> // IWYU pragma: keep
#include <maintenance.h>
+#include <optional>
+#include <string>
#include <utils/ebuildCacheParser.h>
#include <utils/git.h>
diff --git a/gentoobrowse-api/util/update.cpp b/gentoobrowse-api/util/update.cpp
index 2af64a9..f00cd0b 100644
--- a/gentoobrowse-api/util/update.cpp
+++ b/gentoobrowse-api/util/update.cpp
@@ -1,6 +1,17 @@
-#include <Ice/Ice.h>
+#include "maintenance.h"
+#include <Ice/Communicator.h>
+#include <Ice/Exception.h>
+#include <Ice/Initialize.h>
+#include <Ice/Proxy.h>
+#include <algorithm>
#include <boost/program_options.hpp>
-#include <maintenance.h>
+#include <cstdlib>
+#include <exception>
+#include <future>
+#include <iostream>
+#include <memory>
+#include <string>
+#include <vector>
namespace po = boost::program_options;
diff --git a/iwyu.json b/iwyu.json
new file mode 100644
index 0000000..f5aea87
--- /dev/null
+++ b/iwyu.json
@@ -0,0 +1,170 @@
+[
+ {
+ "include": [
+ "\"glibmm/ustring.h\"",
+ "private",
+ "\"wrap/ustring.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "Glib::Regex",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "Glib::RefPtr",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "Glib::MatchInfo",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "Glib::RegexCompileFlags",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "Glib::REGEX_MULTILINE",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "G_REGEX_MULTILINE",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "G_REGEX_CASELESS",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "G_REGEX_OPTIMIZE",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "G_REGEX_UNGREEDY",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "symbol": [
+ "GRegexCompileFlags",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "<glibmm/regex.h>",
+ "private",
+ "\"wrap/regex.h\"",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<git2.*h>",
+ "private",
+ "<git2.h>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<tidy.+\\.h>",
+ "private",
+ "<tidy.h>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<boost/lexical_cast/.*",
+ "private",
+ "<boost/lexical_cast.hpp>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<boost/program_options/.*",
+ "private",
+ "<boost/program_options.hpp>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<boost/preprocessor/.*",
+ "private",
+ "<boost/test/unit_test.hpp>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<boost/test/data/.*",
+ "private",
+ "<boost/test/data/test_case.hpp>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<boost/test/(tools|utils|tree)/.*",
+ "private",
+ "<boost/test/unit_test.hpp>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@<boost/test/unit_test_.*",
+ "private",
+ "<boost/test/unit_test.hpp>",
+ "public"
+ ]
+ },
+ {
+ "include": [
+ "@.libxml.*h.",
+ "private",
+ "\"wrap/domparser.h\"",
+ "public"
+ ]
+ }
+]