Skip to content

Commit b3d7dbd

Browse files
committed
Update third-party include category regex
Previously, a list of third-party include prefixes was specified. However, that list wasn't been kept up-to-date, since it's easy to forget to update the list when adding a third-party dependency. Therefore, a third-party include is now considered to be an include in angle brackets that includes at least one forward slash. The idea being that system headers (C++ headers or Windows headers) will never include a forward slash, so an include in angle brackets that does have a forward slash must be a third-party header.
1 parent c768ba7 commit b3d7dbd

14 files changed

+14
-20
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ IncludeCategories:
4747
Priority: 2
4848
- Regex: '^"'
4949
Priority: 1
50-
- Regex: '^(<(boost|glog|gmock|gtest|nlohmann|wil|winrt)/)'
50+
- Regex: '^<.*/.*>'
5151
Priority: 4
5252
- Regex: '^<.*\.h>'
5353
Priority: 5

Explorer++/Explorer++/ApplicationExecutorImpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ void ApplicationExecutorImpl::Execute(const Application *application, std::wstri
3030
m_coreInterface->OpenFileItem(applicationInfo.application, combinedParameters.c_str());
3131
}
3232

33-
}
33+
}

Explorer++/Explorer++/CrashHandlerHelper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#include "../Helper/Helper.h"
1414
#include "../Helper/ProcessHelper.h"
1515
#include "../Helper/StringHelper.h"
16+
#include <detours/detours.h>
1617
#include <glog/logging.h>
1718
#include <wil/resource.h>
18-
#include <detours/detours.h>
1919
#include <format>
2020

2121
using MiniDumpWriteDumpType = BOOL(WINAPI *)(HANDLE hProcee, DWORD ProcessId, HANDLE hFile,

Explorer++/Explorer++/DarkModeHelper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "DarkModeHelper.h"
77
#include "../Helper/DetoursHelper.h"
88
#include "../Helper/RegistrySettings.h"
9-
#include <wil/common.h>
109
#include <detours/detours.h>
10+
#include <wil/common.h>
1111

1212
DarkModeHelper::OpenNcThemeDataType DarkModeHelper::m_OpenNcThemeData = nullptr;
1313

Explorer++/Explorer++/Plugins/CommandApi/Events/CommandInvoked.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ boost::signals2::connection Plugins::CommandInvoked::connectObserver(
1919

2020
return m_pluginCommandManager->AddCommandInvokedObserver(
2121
[this, observer](int pluginId, const std::wstring &name)
22-
{
23-
onCommandInvoked(pluginId, name, observer);
24-
});
22+
{ onCommandInvoked(pluginId, name, observer); });
2523
}
2624

2725
void Plugins::CommandInvoked::onCommandInvoked(int pluginId, const std::wstring &name,

Explorer++/Explorer++/Plugins/Manifest.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include "Accelerator.h"
88
#include <nlohmann/json.hpp>
9-
#include <optional>
109
#include <sol/sol.hpp>
10+
#include <optional>
1111

1212
namespace std
1313
{

Explorer++/Explorer++/Plugins/MenuApi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include "Plugins/PluginMenuManager.h"
88
#include <boost/signals2.hpp>
9-
#include <optional>
109
#include <sol/forward.hpp>
10+
#include <optional>
1111
#include <unordered_map>
1212

1313
namespace Plugins

Explorer++/Explorer++/Plugins/PluginManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "AcceleratorUpdater.h"
88
#include "Plugins/Manifest.h"
99
#include "Plugins/PluginCommandManager.h"
10-
#include <filesystem>
1110
#include <sol/forward.hpp>
11+
#include <filesystem>
1212

1313
const std::wstring Plugins::PluginManager::MANIFEST_NAME = L"plugin.json";
1414

Explorer++/Explorer++/Plugins/TabsApi/Events/TabMoved.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,5 @@ boost::signals2::connection Plugins::TabMoved::connectObserver(sol::protected_fu
1818

1919
return m_tabContainer->tabMovedSignal.AddObserver(
2020
[observer](const Tab &tab, int fromIndex, int toIndex)
21-
{
22-
observer(tab.GetId(), fromIndex, toIndex);
23-
});
21+
{ observer(tab.GetId(), fromIndex, toIndex); });
2422
}

Explorer++/Explorer++/Plugins/TabsApi/Events/TabUpdated.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ boost::signals2::connection Plugins::TabUpdated::connectObserver(sol::protected_
1717
{
1818
return m_tabContainer->tabUpdatedSignal.AddObserver(
1919
[this, observer, state](const Tab &tab, Tab::PropertyType propertyType)
20-
{
21-
onTabUpdated(observer, state, tab, propertyType);
22-
});
20+
{ onTabUpdated(observer, state, tab, propertyType); });
2321
}
2422

2523
void Plugins::TabUpdated::onTabUpdated(sol::protected_function observer, sol::this_state state,

Explorer++/Explorer++/Plugins/TabsApi/TabsApi.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "ShellBrowser/SortModes.h"
88
#include "ShellBrowser/ViewModes.h"
99
#include "Tab.h"
10-
#include <optional>
1110
#include <sol/forward.hpp>
11+
#include <optional>
1212

1313
class CoreInterface;
1414
class ShellBrowserImpl;

Explorer++/Explorer++/ToolbarView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "../Helper/Controls.h"
88
#include "../Helper/DpiCompatibility.h"
99
#include "../Helper/Helper.h"
10-
#include <wil/common.h>
1110
#include <glog/logging.h>
11+
#include <wil/common.h>
1212

1313
ToolbarButton::ToolbarButton(ClickedCallback clickedCallback) : m_clickedCallback(clickedCallback)
1414
{

Explorer++/Explorer++/stdafx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131

3232
// Third-party Header Files:
3333
#include "../ThirdParty/CTPL/cpl_stl.h"
34-
#include <nlohmann/json.hpp>
3534
#include <cereal/archives/binary.hpp>
3635
#include <cereal/types/memory.hpp>
3736
#include <cereal/types/string.hpp>
3837
#include <cereal/types/vector.hpp>
38+
#include <nlohmann/json.hpp>
3939
#include <sol/sol.hpp>
4040

4141
// Windows Header Files:

Explorer++/Helper/DetoursHelper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include "stdafx.h"
66
#include "DetoursHelper.h"
7-
#include <wil/resource.h>
87
#include <detours/detours.h>
8+
#include <wil/resource.h>
99

1010
LONG DetourTransaction(std::function<LONG()> callback)
1111
{

0 commit comments

Comments
 (0)