Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
|
||||
#include <functional>
|
||||
|
||||
#define QStringAlias(name) \
|
||||
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <boost/optional.hpp>
|
||||
#include "common/WindowDescriptors.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <QApplication>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
/// Command line arguments passed to Chatterino.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
#include "common/FlagsEnum.hpp"
|
||||
#include "messages/LimitedQueue.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
#include <QDate>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <boost/optional.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "common/ChatterSet.hpp"
|
||||
|
||||
#include <tuple>
|
||||
#include "debug/Benchmark.hpp"
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
ChatterSet::ChatterSet()
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/QStringHash.hpp"
|
||||
|
||||
#include <lrucache/lrucache.hpp>
|
||||
#include <QString>
|
||||
|
||||
#include <functional>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include "lrucache/lrucache.hpp"
|
||||
#include "util/QStringHash.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <pajlada/settings.hpp>
|
||||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/preprocessor.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/Outcome.hpp"
|
||||
#include "common/ProviderId.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/preprocessor.hpp>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
enum class HighlightState {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "util/QStringHash.hpp"
|
||||
|
||||
#include <QtAlgorithms>
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
# include "keychain.h"
|
||||
# endif
|
||||
#endif
|
||||
#include <QSaveFile>
|
||||
#include <boost/variant.hpp>
|
||||
#include <QSaveFile>
|
||||
|
||||
#define FORMAT_NAME \
|
||||
([&] { \
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
#include <QString>
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "common/NetworkManager.hpp"
|
||||
#include "common/NetworkResult.hpp"
|
||||
#include "common/Outcome.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "singletons/Paths.hpp"
|
||||
#include "util/DebugCount.hpp"
|
||||
@@ -12,7 +13,6 @@
|
||||
#include <QFile>
|
||||
#include <QNetworkReply>
|
||||
#include <QtConcurrent>
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QHttpMultiPart>
|
||||
#include <QNetworkRequest>
|
||||
#include <QTimer>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "common/NetworkPrivate.hpp"
|
||||
#include "common/Outcome.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "common/Version.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "providers/twitch/TwitchCommon.hpp"
|
||||
@@ -12,7 +13,6 @@
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QtConcurrent>
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "common/NetworkResult.hpp"
|
||||
|
||||
#include <QHttpMultiPart>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "common/NetworkResult.hpp"
|
||||
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/error/en.h>
|
||||
#include <QJsonDocument>
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <rapidjson/document.h>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <QStandardItemModel>
|
||||
#include <QTimer>
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
#include <vector>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTimer>
|
||||
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
#include "common/SignalVector.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
#include <QAbstractTableModel>
|
||||
#include <QMimeData>
|
||||
#include <QStandardItem>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <pajlada/signals/signalholder.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <optional>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user