diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-11-07 15:54:15 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-11-07 15:54:15 +0000 |
commit | b07a7a560a4aa764de89ea7294453e16d188b5a2 (patch) | |
tree | 149f284c6054ecae6963c12158147a4530dfee9e | |
parent | Fix all linter warnings (except iwyu) (diff) | |
download | icetray-b07a7a560a4aa764de89ea7294453e16d188b5a2.tar.bz2 icetray-b07a7a560a4aa764de89ea7294453e16d188b5a2.tar.xz icetray-b07a7a560a4aa764de89ea7294453e16d188b5a2.zip |
IWYU fixes
49 files changed, 411 insertions, 42 deletions
diff --git a/Jamroot.jam b/Jamroot.jam index 5bf8c98..b93415f 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -56,6 +56,7 @@ project <toolset>tidy:<define>ICE_IGNORE_VERSION <toolset>tidy:<librarydef>boost <toolset>tidy:<librarydef>std + <toolset>tidy:<mapping>iwyu.json ; build-project icetray ; diff --git a/icetray/dryice/dryice.cpp b/icetray/dryice/dryice.cpp index 28c7893..b2cec9d 100644 --- a/icetray/dryice/dryice.cpp +++ b/icetray/dryice/dryice.cpp @@ -1,8 +1,10 @@ #include "dryice.h" #include <Ice/Initialize.h> #include <Ice/ObjectAdapter.h> +#include <Ice/ObjectAdapterF.h> +#include <Ice/Properties.h> +#include <Ice/PropertiesF.h> #include <boost/assert.hpp> -#include <factory.h> namespace IceTray { DryIce * DryIce::currentDryIce = nullptr; diff --git a/icetray/dryice/dryice.h b/icetray/dryice/dryice.h index 5ce38da..174537a 100644 --- a/icetray/dryice/dryice.h +++ b/icetray/dryice/dryice.h @@ -3,10 +3,18 @@ #include "icecube.h" #include "icetrayService.h" +#include <Ice/BuiltinSequences.h> #include <Ice/Communicator.h> -#include <IceBox/IceBox.h> +#include <Ice/ObjectAdapter.h> +#include <Ice/ObjectF.h> +#include <Ice/Proxy.h> #include <c++11Helpers.h> +#include <memory> +#include <string> +#include <typeinfo> +#include <utility> #include <visibility.h> +// IWYU pragma: no_include "plugins.impl.h" namespace IceTray { class DLL_PUBLIC DryIce : private Cube { diff --git a/icetray/dryice/mockMailServer.cpp b/icetray/dryice/mockMailServer.cpp index d4e2128..5295725 100644 --- a/icetray/dryice/mockMailServer.cpp +++ b/icetray/dryice/mockMailServer.cpp @@ -1,4 +1,6 @@ #include "mockMailServer.h" +#include <mail.h> +#include <mockMail.h> namespace IceTray::Mail { void diff --git a/icetray/dryice/mockMailServer.h b/icetray/dryice/mockMailServer.h index 3061d9c..d78cbd0 100644 --- a/icetray/dryice/mockMailServer.h +++ b/icetray/dryice/mockMailServer.h @@ -1,8 +1,10 @@ #ifndef ICETRAY_MOCKMAILSERVER_H #define ICETRAY_MOCKMAILSERVER_H +#include <mail.h> #include <mailServer.h> #include <mockMail.h> +#include <visibility.h> namespace IceTray { namespace Mail { diff --git a/icetray/dryice/mockPool.cpp b/icetray/dryice/mockPool.cpp index 6ad91d2..e2ef1e9 100644 --- a/icetray/dryice/mockPool.cpp +++ b/icetray/dryice/mockPool.cpp @@ -1,6 +1,12 @@ #include "mockPool.h" -#include "icetrayService.h" +#include <Ice/PropertiesF.h> +#include <connectionPool.h> +#include <connection_fwd.h> #include <factory.impl.h> +#include <icetrayService.h> +#include <memory> +#include <mockDatabase.h> +#include <utility> namespace IceTray { MockPool::MockPool(const std::string & name, const std::string &, const Ice::PropertiesPtr & p) : diff --git a/icetray/dryice/mockPool.h b/icetray/dryice/mockPool.h index 1cf35bd..caf7e7a 100644 --- a/icetray/dryice/mockPool.h +++ b/icetray/dryice/mockPool.h @@ -3,7 +3,9 @@ #include <Ice/Properties.h> #include <connectionPool.h> -#include <mockDatabase.h> +#include <connection_fwd.h> +#include <string> +#include <visibility.h> namespace IceTray { class DLL_PUBLIC MockPool : public DB::BasicConnectionPool { diff --git a/icetray/icetray/Jamfile.jam b/icetray/icetray/Jamfile.jam index 8d698d6..5527375 100644 --- a/icetray/icetray/Jamfile.jam +++ b/icetray/icetray/Jamfile.jam @@ -7,8 +7,15 @@ iceobj logWriter : logWriter.ice ; iceobj mime : mime.ice ; iceobj mail : mail.ice ; lib icetray : - [ glob *.cpp *.ice : mime.ice mail.ice ] + [ glob *.cpp ] logWriter mime mail + [ obj logWriter : logWriter.ice : + <slicer>pure + <include>. + <toolset>tidy:<checker>none + <implicit-dependency>logWriter + <use>..//adhocutil + <use>..//slicer ] : <library>..//adhocutil <library>..//dbppcore @@ -22,7 +29,6 @@ lib icetray : <library>esmtp <library>../..//openssl <implicit-dependency>logWriter - <slicer>pure <include>. <toolset>tidy:<xcheckxx>hicpp-vararg : : diff --git a/icetray/icetray/abstractCachingDatabaseClient.cpp b/icetray/icetray/abstractCachingDatabaseClient.cpp index e3c293c..3671f63 100644 --- a/icetray/icetray/abstractCachingDatabaseClient.cpp +++ b/icetray/icetray/abstractCachingDatabaseClient.cpp @@ -1,5 +1,7 @@ #include "abstractCachingDatabaseClient.h" #include <cache.impl.h> +#include <connectionPool.h> +#include <visibility.h> template DLL_PUBLIC void AdHoc::Cache<IceTray::AbstractCachingDatabaseClient::CacheItem, IceTray::AbstractCachingDatabaseClient::CacheKey>::add( diff --git a/icetray/icetray/abstractCachingDatabaseClient.h b/icetray/icetray/abstractCachingDatabaseClient.h index b50f85f..890c9fd 100644 --- a/icetray/icetray/abstractCachingDatabaseClient.h +++ b/icetray/icetray/abstractCachingDatabaseClient.h @@ -2,9 +2,20 @@ #define ICETRAY_ABSTRACTCACHINGDATABASECLIENT_H #include "abstractDatabaseClient.h" +#include "sqlSource.h" #include <any> -#include <cache.h> +#include <cache.h> // IWYU pragma: keep +#include <command.h> +#include <command_fwd.h> +#include <connectionPool.h> +#include <ctime> +#include <functional> #include <memory> +#include <optional> +#include <typeinfo> +#include <vector> +#include <visibility.h> +// IWYU pragma: no_include "cache.impl.h" namespace IceTray { class DLL_PUBLIC AbstractCachingDatabaseClient : public AbstractDatabaseClient { diff --git a/icetray/icetray/abstractDatabaseClient.cpp b/icetray/icetray/abstractDatabaseClient.cpp index e84e958..289e886 100644 --- a/icetray/icetray/abstractDatabaseClient.cpp +++ b/icetray/icetray/abstractDatabaseClient.cpp @@ -1,6 +1,7 @@ #include "abstractDatabaseClient.h" -#include "Ice/Config.h" -#include "IceUtil/Optional.h" +#include <command.h> +#include <connectionPool.h> +#include <utility> namespace IceTray { AbstractDatabaseClient::AbstractDatabaseClient(DB::ConnectionPoolPtr d) : db(std::move(d)) { } diff --git a/icetray/icetray/abstractDatabaseClient.h b/icetray/icetray/abstractDatabaseClient.h index 3a835cb..e798c2e 100644 --- a/icetray/icetray/abstractDatabaseClient.h +++ b/icetray/icetray/abstractDatabaseClient.h @@ -5,10 +5,17 @@ #include <Ice/BuiltinSequences.h> #include <command.h> #include <connectionPool.h> -#include <db/sqlSelectDeserializer.h> -#include <selectcommand.h> +#include <db/sqlSelectDeserializer.h> // IWYU pragma: keep +#include <memory> +#include <optional> +#include <resourcePool.impl.h> +#include <selectcommand.h> // IWYU pragma: keep #include <slicer/slicer.h> +#include <string> #include <visibility.h> +namespace DB { + class Connection; +} namespace IceTray { class DLL_PUBLIC AbstractDatabaseClient { diff --git a/icetray/icetray/defaultPool.cpp b/icetray/icetray/defaultPool.cpp index 12da668..d1fa19b 100644 --- a/icetray/icetray/defaultPool.cpp +++ b/icetray/icetray/defaultPool.cpp @@ -1,5 +1,11 @@ #include "defaultPool.h" #include "icetrayService.h" +#include <Ice/Properties.h> +#include <Ice/PropertiesF.h> +#include <connectionPool.h> +#include <factory.h> +#include <memory> +#include <string> namespace IceTray { DefaultPool::DefaultPool(const std::string & name, const std::string & type, const Ice::PropertiesPtr & p) : diff --git a/icetray/icetray/defaultPool.h b/icetray/icetray/defaultPool.h index 2caa71c..6bd7150 100644 --- a/icetray/icetray/defaultPool.h +++ b/icetray/icetray/defaultPool.h @@ -3,6 +3,7 @@ #include <Ice/Properties.h> #include <connectionPool.h> +#include <string> namespace IceTray { class DefaultPool : public DB::ConnectionPool { diff --git a/icetray/icetray/icecube.h b/icetray/icetray/icecube.h index 4ddc543..476b475 100644 --- a/icetray/icetray/icecube.h +++ b/icetray/icetray/icecube.h @@ -4,7 +4,18 @@ #include "icetrayService.h" #include <Ice/Initialize.h> #include <Ice/ObjectAdapter.h> -#include <plugins.h> +#include <Ice/Proxy.h> +#include <Ice/ProxyF.h> +#include <memory> +#include <plugins.h> // IWYU pragma: keep +#include <string> +#include <type_traits> +#include <typeinfo> +#include <utility> +// IWYU pragma: no_include "plugins.impl.h" +namespace Ice { + class Object; +} namespace IceTray { class CubePlugIn : public AdHoc::AbstractPluginImplementation { diff --git a/icetray/icetray/icetrayService.cpp b/icetray/icetray/icetrayService.cpp index 831ea29..152a3fd 100644 --- a/icetray/icetray/icetrayService.cpp +++ b/icetray/icetray/icetrayService.cpp @@ -1,7 +1,14 @@ #include "icetrayService.h" -#include <Ice/Ice.h> +#include "connectionPool.h" +#include "logger.h" +#include <Ice/Communicator.h> +#include <Ice/ObjectAdapter.h> +#include <Ice/Optional.h> +#include <Ice/Properties.h> +#include <Ice/Proxy.h> #include <boost/assert.hpp> #include <factory.impl.h> +#include <type_traits> #include <visibility.h> namespace IceTray { diff --git a/icetray/icetray/icetrayService.h b/icetray/icetray/icetrayService.h index d0be7ae..f331ece 100644 --- a/icetray/icetray/icetrayService.h +++ b/icetray/icetray/icetrayService.h @@ -1,12 +1,20 @@ #ifndef ICETRAY_SERVICE_H #define ICETRAY_SERVICE_H -#include "logger.h" +#include "logWriter.h" #include "options.h" +#include <Ice/BuiltinSequences.h> +#include <Ice/CommunicatorF.h> +#include <Ice/ObjectAdapterF.h> +#include <Ice/PropertiesF.h> #include <IceBox/IceBox.h> #include <c++11Helpers.h> #include <connectionPool.h> #include <factory.h> +#include <memory> +#include <plugins.h> +#include <set> +#include <string> #include <visibility.h> namespace IceTray { diff --git a/icetray/icetray/logWriterConsole.cpp b/icetray/icetray/logWriterConsole.cpp index be5d6ae..e28664b 100644 --- a/icetray/icetray/logWriterConsole.cpp +++ b/icetray/icetray/logWriterConsole.cpp @@ -1,6 +1,13 @@ #include "logWriterConsole.h" +#include <compileTimeFormatter.h> +#include <factory.h> +#include <iostream> #include <logWriter.h> +#include <memory> #include <slicer/modelPartsTypes.h> +namespace Ice { + struct Current; +} // NOLINTNEXTLINE(modernize-concat-nested-namespaces) namespace IceTray { diff --git a/icetray/icetray/logWriterConsole.h b/icetray/icetray/logWriterConsole.h index 3dea22d..0328843 100644 --- a/icetray/icetray/logWriterConsole.h +++ b/icetray/icetray/logWriterConsole.h @@ -1,7 +1,15 @@ #ifndef ICETRAY_LOGGING_CONSOLE_H #define ICETRAY_LOGGING_CONSOLE_H +#include "logWriter.h" #include "logger.h" +#include <Ice/Properties.h> +#include <iosfwd> +#include <string_view> +#include <visibility.h> +namespace Ice { + struct Current; +} namespace IceTray { namespace Logging { diff --git a/icetray/icetray/logWriterSyslog.cpp b/icetray/icetray/logWriterSyslog.cpp index 55c3abf..7f4ab93 100644 --- a/icetray/icetray/logWriterSyslog.cpp +++ b/icetray/icetray/logWriterSyslog.cpp @@ -1,5 +1,9 @@ #include "logWriterSyslog.h" +#include <compileTimeFormatter.h> +#include <factory.h> #include <logWriter.h> +#include <memory> +#include <string> #include <syslog.h> // NOLINTNEXTLINE(modernize-concat-nested-namespaces) diff --git a/icetray/icetray/logWriterSyslog.h b/icetray/icetray/logWriterSyslog.h index c557281..5c67f7e 100644 --- a/icetray/icetray/logWriterSyslog.h +++ b/icetray/icetray/logWriterSyslog.h @@ -1,8 +1,14 @@ #ifndef ICETRAY_LOGGING_SYSLOG_H #define ICETRAY_LOGGING_SYSLOG_H +#include "logWriter.h" #include "logger.h" +#include <Ice/Properties.h> #include <c++11Helpers.h> +#include <string_view> +namespace Ice { + struct Current; +} namespace IceTray { namespace Logging { diff --git a/icetray/icetray/logger.cpp b/icetray/icetray/logger.cpp index cb27d2d..990db6d 100644 --- a/icetray/icetray/logger.cpp +++ b/icetray/icetray/logger.cpp @@ -1,12 +1,29 @@ #include "logger.h" +#include "logWriter.h" +#include <Ice/BuiltinSequences.h> #include <boost/algorithm/string/classification.hpp> +#include <boost/algorithm/string/constants.hpp> +#include <boost/algorithm/string/detail/classification.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/split.hpp> -#include <buffer.h> +#include <boost/core/addressof.hpp> +#include <boost/format.hpp> +#include <boost/function/function_base.hpp> +#include <boost/iterator/iterator_facade.hpp> +#include <boost/type_index/type_index_facade.hpp> +#include <compileTimeFormatter.h> +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <cxxabi.h> #include <factory.impl.h> #include <globalStatic.impl.h> +#include <iterator> #include <lockHelpers.h> +#include <mutex> #include <slicer/modelPartsTypes.h> +#include <utility> +#include <vector> INSTANTIATEFACTORY(IceTray::Logging::LogWriter, const Ice::PropertiesPtr &) diff --git a/icetray/icetray/logger.h b/icetray/icetray/logger.h index ebee7e5..319c099 100644 --- a/icetray/icetray/logger.h +++ b/icetray/icetray/logger.h @@ -1,21 +1,32 @@ #ifndef ICETRAY_LOGGING_H #define ICETRAY_LOGGING_H +#include <Ice/Optional.h> #include <Ice/Properties.h> +#include <array> #include <boost/format/format_fwd.hpp> #include <buffer.h> #include <c++11Helpers.h> #include <compileTimeFormatter.h> +#include <cstddef> #include <factory.h> -#include <globalStatic.h> #include <logWriter.h> #include <map> +#include <memory> +#include <optional> +#include <set> #include <shared_mutex> +#include <string> +#include <sys/types.h> +#include <type_traits> +#include <typeinfo> #include <visibility.h> +namespace Ice { + struct Current; +} namespace IceTray { namespace Logging { - class LogManager; class LoggerBase; using LogWriters = std::set<LogWriterPrxPtr>; diff --git a/icetray/icetray/mailServer.cpp b/icetray/icetray/mailServer.cpp index 2e5b628..55e94da 100644 --- a/icetray/icetray/mailServer.cpp +++ b/icetray/icetray/mailServer.cpp @@ -1,6 +1,12 @@ #include "mailServer.h" +#include "mail.h" +#include "mime.h" +#include <array> #include <libesmtp.h> +#include <memory> #include <memstream.h> +#include <ostream> +#include <utility> namespace IceTray::Mail { LibesmtpMailServer::LibesmtpMailServer(std::string s) : server(std::move(s)) { } diff --git a/icetray/icetray/mailServer.h b/icetray/icetray/mailServer.h index a77dd46..cd6f1c7 100644 --- a/icetray/icetray/mailServer.h +++ b/icetray/icetray/mailServer.h @@ -2,7 +2,9 @@ #ifndef ICETRAY_MAILSERVER_H #define ICETRAY_MAILSERVER_H +#include <cstdio> #include <mail.h> +#include <string> #include <visibility.h> namespace IceTray { diff --git a/icetray/icetray/mimeImpl.cpp b/icetray/icetray/mimeImpl.cpp index 3f30112..b24f6c5 100644 --- a/icetray/icetray/mimeImpl.cpp +++ b/icetray/icetray/mimeImpl.cpp @@ -1,7 +1,14 @@ #include "mimeImpl.h" +#include "mime.h" +#include "stream_support.h" +#include <algorithm> +#include <cstdint> +#include <map> +#include <memory> #include <openssl/bio.h> #include <openssl/evp.h> #include <string_view> +#include <utility> namespace IceTray::Mime { static const char * const DIVIDER = "//divider//"; diff --git a/icetray/icetray/mimeImpl.h b/icetray/icetray/mimeImpl.h index 7056755..1a28d88 100644 --- a/icetray/icetray/mimeImpl.h +++ b/icetray/icetray/mimeImpl.h @@ -1,9 +1,18 @@ #ifndef ICETRAY_MIME_IMPL_H #define ICETRAY_MIME_IMPL_H -#include <mime.h> +#include "mime.h" +#include <Ice/Config.h> +#include <cstdint> +#include <cstdio> +#include <string> +#include <string_view> +#include <vector> #include <visibility.h> +namespace IceTray { + class StreamPtr; +} namespace IceTray::Mime { class DLL_PUBLIC PartHelper { protected: diff --git a/icetray/icetray/options.cpp b/icetray/icetray/options.cpp index 23346ab..e999881 100644 --- a/icetray/icetray/options.cpp +++ b/icetray/icetray/options.cpp @@ -1,5 +1,14 @@ #include "options.h" +#include <algorithm> +#include <boost/program_options/errors.hpp> +#include <boost/program_options/option.hpp> +#include <boost/program_options/parsers.hpp> +#include <boost/program_options/variables_map.hpp> #include <factory.impl.h> +#include <set> +#include <utility> +#include <vector> +// IWYU pragma: no_include <boost/smart_ptr/shared_ptr.hpp> INSTANTIATEVOIDFACTORY(IceTray::Options) INSTANTIATEPLUGINOF(IceTray::Options) diff --git a/icetray/icetray/options.h b/icetray/icetray/options.h index e7d5e29..c41cd4b 100644 --- a/icetray/icetray/options.h +++ b/icetray/icetray/options.h @@ -2,9 +2,14 @@ #define ICETRAY_OPTIONS_H #include <Ice/Properties.h> -#include <boost/program_options.hpp> +#include <boost/program_options/options_description.hpp> #include <c++11Helpers.h> #include <factory.h> +#include <iosfwd> +#include <memory> +#include <plugins.impl.h> +#include <string> +#include <typeinfo> #include <visibility.h> namespace IceTray { diff --git a/icetray/icetray/sqlSource.cpp b/icetray/icetray/sqlSource.cpp index 7d3c619..f4d4525 100644 --- a/icetray/icetray/sqlSource.cpp +++ b/icetray/icetray/sqlSource.cpp @@ -1,5 +1,5 @@ #include "sqlSource.h" -#include <command.h> +#include <command_fwd.h> #include <connection.h> namespace IceTray { diff --git a/icetray/icetray/sqlSource.h b/icetray/icetray/sqlSource.h index eb428dc..0e5871a 100644 --- a/icetray/icetray/sqlSource.h +++ b/icetray/icetray/sqlSource.h @@ -3,9 +3,11 @@ #include <c++11Helpers.h> #include <command_fwd.h> -#include <connection_fwd.h> #include <string> #include <visibility.h> +namespace DB { + class Connection; +} namespace IceTray { class DLL_PUBLIC SqlSource { diff --git a/icetray/icetray/staticSqlSource.cpp b/icetray/icetray/staticSqlSource.cpp index ab94b1e..592be97 100644 --- a/icetray/icetray/staticSqlSource.cpp +++ b/icetray/icetray/staticSqlSource.cpp @@ -1,5 +1,7 @@ #include "staticSqlSource.h" #include <command.h> +#include <command_fwd.h> +#include <utility> namespace IceTray { StaticSqlSource::StaticSqlSource(std::string s) : diff --git a/icetray/icetray/staticSqlSource.h b/icetray/icetray/staticSqlSource.h index b64b86d..c39a5e8 100644 --- a/icetray/icetray/staticSqlSource.h +++ b/icetray/icetray/staticSqlSource.h @@ -2,6 +2,9 @@ #define ICETRAY_STATICSQLSOURCE_H #include "sqlSource.h" +#include <command_fwd.h> +#include <string> +#include <visibility.h> namespace IceTray { class DLL_PUBLIC StaticSqlSource : public SqlSource { diff --git a/icetray/tool/icetrayDoc.cpp b/icetray/tool/icetrayDoc.cpp index 0f511e0..f5f7d68 100644 --- a/icetray/tool/icetrayDoc.cpp +++ b/icetray/tool/icetrayDoc.cpp @@ -1,8 +1,17 @@ +#include <boost/lexical_cast/bad_lexical_cast.hpp> #include <boost/program_options.hpp> +#include <boost/program_options/errors.hpp> +#include <boost/program_options/options_description.hpp> +#include <boost/program_options/parsers.hpp> +#include <boost/program_options/positional_options.hpp> +#include <boost/program_options/value_semantic.hpp> +#include <boost/program_options/variables_map.hpp> #include <compileTimeFormatter.h> #include <dlfcn.h> #include <iostream> #include <options.h> +#include <string> +#include <vector> namespace po = boost::program_options; diff --git a/icetray/tool/icetraySql.cpp b/icetray/tool/icetraySql.cpp index 521a2f0..265250a 100644 --- a/icetray/tool/icetraySql.cpp +++ b/icetray/tool/icetraySql.cpp @@ -1,17 +1,38 @@ +#include <algorithm> #include <boost/algorithm/string/classification.hpp> +#include <boost/algorithm/string/constants.hpp> +#include <boost/algorithm/string/detail/classification.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/split.hpp> +#include <boost/core/addressof.hpp> +#include <boost/detail/basic_pointerbuf.hpp> +#include <boost/function/function_base.hpp> +#include <boost/iterator/iterator_facade.hpp> +#include <boost/lexical_cast/bad_lexical_cast.hpp> #include <boost/program_options.hpp> +#include <boost/program_options/errors.hpp> +#include <boost/program_options/options_description.hpp> +#include <boost/program_options/parsers.hpp> +#include <boost/program_options/positional_options.hpp> +#include <boost/program_options/value_semantic.hpp> +#include <boost/program_options/variables_map.hpp> +#include <boost/type_index/type_index_facade.hpp> +#include <chrono> #include <compileTimeFormatter.h> #include <filesystem> -#include <fstream> +#include <fstream> // IWYU pragma: keep #include <iostream> +#include <iterator> +#include <string> +#include <vector> namespace po = boost::program_options; namespace fs = std::filesystem; AdHocFormatter(CPPHeader, R"C(#include "%?.h" +#include <staticSqlSource.h> +#include <string> const IceTray::StaticSqlSource )C"); AdHocFormatter(CPPNS, "%?::"); diff --git a/icetray/unittests/testDefaultPool.cpp b/icetray/unittests/testDefaultPool.cpp index 4b9f7a7..8f637eb 100644 --- a/icetray/unittests/testDefaultPool.cpp +++ b/icetray/unittests/testDefaultPool.cpp @@ -3,11 +3,11 @@ #include <Ice/Initialize.h> #include <Ice/Properties.h> +#include <connection.h> #include <connectionPool.h> -#include <error.h> -#include <factory.h> -#include <factory.impl.h> #include <icetrayService.h> +#include <memory> +#include <resourcePool.impl.h> BOOST_AUTO_TEST_CASE(defaultPool) { diff --git a/icetray/unittests/testIceBoxInterface.cpp b/icetray/unittests/testIceBoxInterface.cpp index d5132d4..73e2fc3 100644 --- a/icetray/unittests/testIceBoxInterface.cpp +++ b/icetray/unittests/testIceBoxInterface.cpp @@ -1,6 +1,7 @@ #define BOOST_TEST_MODULE TestIceBoxInterface #include <boost/test/unit_test.hpp> +#include <Ice/CommunicatorF.h> #include <dlfcn.h> #include <icetrayService.h> diff --git a/icetray/unittests/testIceTray.cpp b/icetray/unittests/testIceTray.cpp index 864904a..8277adb 100644 --- a/icetray/unittests/testIceTray.cpp +++ b/icetray/unittests/testIceTray.cpp @@ -1,16 +1,19 @@ #define BOOST_TEST_MODULE TestIceTray #include <boost/test/unit_test.hpp> -#include "testIceTrayServiceI.h" -#include <Ice/Communicator.h> +#include "testIceTrayService.h" +#include <Ice/Proxy.h> +#include <definedDirs.h> #include <dryice.h> +#include <filesystem> +#include <icecube.h> +#include <icetrayService.h> +#include <memory> #include <mockDatabase.h> +#include <pq-mock.h> #include <staticSqlSource.h> #include <testIceTrayServiceTestSql.sql.h> -#include <definedDirs.h> -#include <pq-mock.h> - class Service : public IceTray::DryIce, DB::PluginMock<PQ::Mock> { public: Service() : diff --git a/icetray/unittests/testIceTrayLogger.cpp b/icetray/unittests/testIceTrayLogger.cpp index 2b658e8..5a436e8 100644 --- a/icetray/unittests/testIceTrayLogger.cpp +++ b/icetray/unittests/testIceTrayLogger.cpp @@ -5,13 +5,28 @@ #include <Ice/Communicator.h> #include <Ice/Initialize.h> #include <Ice/ObjectAdapter.h> +#include <Ice/Optional.h> +#include <Ice/Properties.h> +#include <Ice/PropertiesF.h> +#include <Ice/Proxy.h> #include <boost/format.hpp> #include <compileTimeFormatter.h> -#include <icetrayService.h> +#include <factory.h> +#include <logWriter.h> #include <logWriterConsole.h> #include <logger.h> -#include <slicer/common.h> +#include <memory> +#include <slicer/common.h> // IWYU pragma: keep #include <slicer/modelPartsTypes.h> +#include <string> +#include <string_view> +#include <vector> +namespace Ice { + struct Current; +} +namespace IceTray { + class Service; +} using namespace IceTray::Logging; diff --git a/icetray/unittests/testIceTrayMail.cpp b/icetray/unittests/testIceTrayMail.cpp index b4394fb..9dc23a0 100644 --- a/icetray/unittests/testIceTrayMail.cpp +++ b/icetray/unittests/testIceTrayMail.cpp @@ -2,12 +2,22 @@ #include <boost/test/data/test_case.hpp> #include <boost/test/unit_test.hpp> +#include <cstdint> +#include <cstdio> #include <definedDirs.h> #include <fileUtils.h> +#include <iosfwd> +#include <mail.h> #include <mailServer.h> +#include <memory> #include <memstream.h> +#include <mime.h> #include <mimeImpl.h> #include <mockMailServer.h> +#include <string> +#include <string_view> +#include <tuple> +#include <vector> using namespace std::string_literals; using namespace IceTray::Mime; diff --git a/icetray/unittests/testIceTrayOptions.cpp b/icetray/unittests/testIceTrayOptions.cpp index 81a98a0..73b9187 100644 --- a/icetray/unittests/testIceTrayOptions.cpp +++ b/icetray/unittests/testIceTrayOptions.cpp @@ -2,11 +2,11 @@ #include <boost/test/unit_test.hpp> #include "dryice.h" -#include "icetrayService.h" #include "testOptions.h" -#include <Ice/Communicator.h> -#include <Ice/Initialize.h> -#include <Ice/ObjectAdapter.h> +#include <Ice/BuiltinSequences.h> +#include <options.h> +#include <string> +#include <vector> // // TestService is pulled in from libtestService.so diff --git a/icetray/unittests/testIceTrayReplace.cpp b/icetray/unittests/testIceTrayReplace.cpp index 7d5371a..a56e89d 100644 --- a/icetray/unittests/testIceTrayReplace.cpp +++ b/icetray/unittests/testIceTrayReplace.cpp @@ -1,12 +1,16 @@ #define BOOST_TEST_MODULE TestIceTray #include <boost/test/unit_test.hpp> +#include "testIceTrayService.h" #include "testIceTrayServiceI.h" -#include <Ice/Communicator.h> +#include <Ice/Config.h> #include <dryice.h> - -#include <definedDirs.h> -#include <pq-mock.h> +#include <memory> +#include <string> +// IWYU pragma: no_include "plugins.impl.h" +namespace Ice { + struct Current; +} namespace TestIceTray { class DummyTestIceTrayServiceI : public TestIceTrayService { diff --git a/icetray/unittests/testIceTrayServiceI.cpp b/icetray/unittests/testIceTrayServiceI.cpp index 5c95a97..7e79359 100644 --- a/icetray/unittests/testIceTrayServiceI.cpp +++ b/icetray/unittests/testIceTrayServiceI.cpp @@ -1,15 +1,29 @@ #include "testIceTrayServiceI.h" #include "icecube.h" +#include "testIceTrayService.h" #include <Ice/Communicator.h> -#include <Ice/Initialize.h> #include <Ice/ObjectAdapter.h> +#include <Ice/Optional.h> +#include <abstractCachingDatabaseClient.h> #include <boost/assert.hpp> -#include <boost/test/test_tools.hpp> +#include <boost/test/unit_test.hpp> +#include <command.h> +#include <connectionPool.h> #include <factory.h> +#include <icetrayService.h> +#include <iosfwd> +#include <memory> +#include <optional> +#include <staticSqlSource.h> #include <subdir/a/more.sql.h> #include <subdir/some.sql.h> #include <testIceTrayServiceTestSql.sql.h> +// IWYU pragma: no_include "plugins.impl.h" +// IWYU pragma: no_include "resourcePool.impl.h" +namespace Ice { + struct Current; +} class Foo { }; diff --git a/icetray/unittests/testIceTrayServiceI.h b/icetray/unittests/testIceTrayServiceI.h index 8dae0f3..ee5db40 100644 --- a/icetray/unittests/testIceTrayServiceI.h +++ b/icetray/unittests/testIceTrayServiceI.h @@ -1,9 +1,18 @@ #ifndef TEST_ICETRAY_SERVICE_IMPL_H #define TEST_ICETRAY_SERVICE_IMPL_H +#include <Ice/BuiltinSequences.h> +#include <Ice/CommunicatorF.h> +#include <Ice/Config.h> +#include <Ice/ObjectAdapterF.h> #include <abstractCachingDatabaseClient.h> +#include <connectionPool.h> #include <icetrayService.h> +#include <string> #include <testIceTrayService.h> +namespace Ice { + struct Current; +} namespace TestIceTray { class TestIceTrayServiceI : IceTray::AbstractCachingDatabaseClient, public TestIceTrayService { diff --git a/icetray/unittests/testOptions.cpp b/icetray/unittests/testOptions.cpp index 4151b32..baf366e 100644 --- a/icetray/unittests/testOptions.cpp +++ b/icetray/unittests/testOptions.cpp @@ -1,4 +1,10 @@ #include "testOptions.h" +#include <boost/lexical_cast/bad_lexical_cast.hpp> +#include <boost/program_options.hpp> +#include <boost/program_options/options_description.hpp> +#include <boost/program_options/value_semantic.hpp> +#include <factory.h> +#include <options.h> TestOptions::TestOptions() : IceTray::Options("Test options"), testInt(0) { } diff --git a/icetray/unittests/testOptions.h b/icetray/unittests/testOptions.h index 7271fb7..bd484f1 100644 --- a/icetray/unittests/testOptions.h +++ b/icetray/unittests/testOptions.h @@ -2,6 +2,9 @@ #define ICETRAY_TEST_TESTOPTIONS_H #include <options.h> +#include <string> +#include <vector> +#include <visibility.h> class DLL_PUBLIC TestOptions : public IceTray::Options { public: diff --git a/icetray/unittests/testService.cpp b/icetray/unittests/testService.cpp index baeecf6..786cf7e 100644 --- a/icetray/unittests/testService.cpp +++ b/icetray/unittests/testService.cpp @@ -1,5 +1,8 @@ #include "testService.h" #include "testOptions.h" +#include <factory.h> +#include <icetrayService.h> +#include <options.h> void TestService::addObjects( diff --git a/icetray/unittests/testService.h b/icetray/unittests/testService.h index 930362b..476afed 100644 --- a/icetray/unittests/testService.h +++ b/icetray/unittests/testService.h @@ -1,4 +1,9 @@ +#include <Ice/BuiltinSequences.h> +#include <Ice/CommunicatorF.h> +#include <Ice/ObjectAdapterF.h> #include <icetrayService.h> +#include <string> +#include <visibility.h> class DLL_PUBLIC TestService : public IceTray::Service { public: diff --git a/iwyu.json b/iwyu.json new file mode 100644 index 0000000..07d5709 --- /dev/null +++ b/iwyu.json @@ -0,0 +1,85 @@ +[ + { + "symbol": [ + "BIO", + "private", + "<openssl/bio.h>", + "public" + ] + }, + { + "include": [ + "@<boost/test/(unit_test_suite|framework).hpp>", + "private", + "<boost/test/unit_test.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/test/(utils|tools|tree)/.*>", + "private", + "<boost/test/unit_test.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/format/(format_(class|implementation)|alt_sstream).hpp>", + "private", + "<boost/format.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/test/data/.*>", + "private", + "<boost/test/data/test_case.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/iostreams/detail/.*>", + "private", + "<boost/iostreams/stream.hpp>", + "public" + ] + }, + { + "include": [ + "<boost/lambda/core.hpp>", + "private", + "<boost/lambda/lambda.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/lambda/detail/.*>", + "private", + "<boost/lambda/lambda.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/preprocessor/.*>", + "private", + "<boost/test/unit_test.hpp>", + "public" + ] + }, + { + "include": [ + "@<boost/program_options/detail/.*>", + "private", + "<boost/program_options.hpp>", + "public" + ] + }, + { + "ref": "/usr/lib/llvm/12/share/include-what-you-use/boost-all-private.imp" + } +] |