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:
@@ -1,6 +1,6 @@
|
||||
#include "util/Clipboard.hpp"
|
||||
#include <QApplication>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
#include "common/UniqueAccess.hpp"
|
||||
|
||||
#include <mutex>
|
||||
#include <typeinfo>
|
||||
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
|
||||
#include <mutex>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class DebugCount
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QEvent>
|
||||
#include <QObject>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QLayout>
|
||||
#include <boost/variant.hpp>
|
||||
#include <QLayout>
|
||||
|
||||
class QWidget;
|
||||
class QScrollArea;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "common/Env.hpp"
|
||||
#include "common/NetworkRequest.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||
#include "singletons/Paths.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
@@ -14,7 +15,6 @@
|
||||
#include <QMimeDatabase>
|
||||
#include <QMutex>
|
||||
#include <QSaveFile>
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
#define UPLOAD_DELAY 2000
|
||||
// Delay between uploads in milliseconds
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "common/ChatterinoSetting.hpp"
|
||||
#include "common/SignalVector.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QObject>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <pajlada/serialize.hpp>
|
||||
#include <QString>
|
||||
|
||||
namespace pajlada {
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "util/RapidJsonSerializeQString.hpp"
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <pajlada/serialize.hpp>
|
||||
#include <rapidjson/document.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#include "util/StreamLink.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "common/Version.hpp"
|
||||
#include "providers/irc/IrcMessageBuilder.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
#include "util/SplitCommand.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/QualityPopup.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
|
||||
#include <QErrorMessage>
|
||||
#include <QFileInfo>
|
||||
#include <QProcess>
|
||||
#include "common/QLogging.hpp"
|
||||
#include "common/Version.hpp"
|
||||
|
||||
#include <functional>
|
||||
|
||||
|
||||
@@ -6,17 +6,19 @@
|
||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
|
||||
#ifdef USEWINSDK
|
||||
// clang-format off
|
||||
# include <Windows.h>
|
||||
|
||||
# include <VersionHelpers.h>
|
||||
# include <WtsApi32.h>
|
||||
# pragma comment(lib, "Wtsapi32.lib")
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
#ifdef USEWINSDK
|
||||
|
||||
// clang-format off
|
||||
# include <Windows.h>
|
||||
# include <boost/optional.hpp>
|
||||
// clang-format on
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <pajlada/serialize.hpp>
|
||||
#include <QString>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user