Skip to content

Commit 937ee23

Browse files
committed
Fix include sorting
1 parent 98cf31d commit 937ee23

19 files changed

Lines changed: 187 additions & 204 deletions

File tree

.clang-format

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
Language: Cpp
3+
#BasedOnStyle: none
34
AccessModifierOffset: -4
45
# AlignAfterOpenBracket: Align
56
AlignArrayOfStructures: Right
@@ -104,20 +105,11 @@ FixNamespaceComments: true
104105
# - BOOST_FOREACH
105106
# IfMacros:
106107
# - KJ_IF_MAYBE
107-
# IncludeBlocks: Preserve
108-
# IncludeCategories:
109-
# - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
110-
# Priority: 2
111-
# SortPriority: 0
112-
# CaseSensitive: false
113-
# - Regex: '^(<|"(gtest|isl|json)/)'
114-
# Priority: 3
115-
# SortPriority: 0
116-
# CaseSensitive: false
117-
# - Regex: '.*'
118-
# Priority: 1
119-
# SortPriority: 0
120-
# CaseSensitive: false
108+
IncludeBlocks: Preserve
109+
IncludeCategories:
110+
- Regex: '.*'
111+
Priority: 0
112+
CaseSensitive: true
121113
# IncludeIsMainRegex: '$'
122114
# IncludeIsMainSourceRegex: ''
123115
# IndentAccessModifiers: false
@@ -185,7 +177,7 @@ RequiresClausePosition: OwnLine
185177
RequiresExpressionIndentation: OuterScope
186178
SeparateDefinitionBlocks: Leave
187179
ShortNamespaceLines: 1
188-
SortIncludes: CaseSensitive
180+
SortIncludes: CaseSensitive
189181
SortUsingDeclarations: LexicographicNumeric
190182
SpaceAfterCStyleCast: false
191183
SpaceAfterLogicalNot: false
@@ -242,5 +234,7 @@ UseTab: Never
242234
#WrapNamespaceBodyWithEmptyLinesStyle: Always # Clang-20
243235
---
244236
Language: ObjC
245-
ObjCSpaceBeforeProtocolList: true
237+
ObjCBlockIndentWidth: 4
238+
ObjCSpaceBeforeProtocolList: false
246239
IndentWidth: 4
240+
...

libraries/application/tests/po/adapters/std/filesystem.tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ TEST_CASE_METHOD(LoggingFixture, "Test parsing of std filesystem path as options
4949
REQUIRE(getPath(".") == std::filesystem::path("."));
5050
REQUIRE(getPath("..") == std::filesystem::path(".."));
5151
REQUIRE(getPath(exeLocation.string()) == exeLocation);
52-
REQUIRE(getPath((exeLocation / ".").lexically_normal().string()) != exeLocation); // Not the same, depends on context: https://stackoverflow.com/questions/42952605/boostfilesystempathlexically-normal-is-this-incorrect-behavior
52+
// Not the same, depends on context: https://stackoverflow.com/questions/42952605/boostfilesystempathlexically-normal-is-this-incorrect-behavior
53+
REQUIRE(getPath((exeLocation / ".").lexically_normal().string()) != exeLocation);
5354
if (exeLocation.has_parent_path())
5455
REQUIRE(getPath((exeLocation / "..").lexically_normal().string()) == exeLocation.parent_path());
5556

libraries/core/src/morpheus/core/conformance/version.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
/// \note
1111
/// #include <version> on Windows can accidentally picks up VERSION files. Use the old <ciso646>
1212
/// instead. For details see: https://bugs.llvm.org/show_bug.cgi?id=42540
13-
//#if __has_include(<version>) && (MORPHEUS_BUILD_PLATFORM == MORPHEUS_TARGET_PLATFORM_PC_WINDOWS)
14-
#include <version> // IWYU pragma: export
15-
//#else
16-
// #include <ciso646>
17-
//#endif
13+
// #if __has_include(<version>) && (MORPHEUS_BUILD_PLATFORM == MORPHEUS_TARGET_PLATFORM_PC_WINDOWS)
14+
#include <version> // IWYU pragma: export
15+
// #else
16+
// #include <ciso646>
17+
// #endif

libraries/core/src/morpheus/core/containers/concepts/detail/return_types.hpp

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,19 @@ namespace morpheus::containers::concepts::detail
77
{
88

99
template <typename I, typename T>
10-
concept InsertReturnType = requires
11-
{
12-
requires std::same_as<I, typename T::iterator> or std::same_as<I, std::pair<typename T::iterator, bool>>;
13-
};
10+
concept InsertReturnType = requires { requires std::same_as<I, typename T::iterator> or std::same_as<I, std::pair<typename T::iterator, bool>>; };
1411

1512
template <typename I, typename T>
16-
concept InsertNodeHandleReturnType = requires
17-
{
13+
concept InsertNodeHandleReturnType = requires {
1814
requires requires { requires std::same_as<I, typename T::iterator>; } or requires { requires std::same_as<I, typename T::insert_return_type>; };
1915
};
2016

2117
template <typename I, typename T>
22-
concept BoundReturnType = requires
23-
{
24-
requires std::same_as<I, typename T::iterator> or std::same_as<I, std::pair<typename T::iterator, typename T::iterator>>;
25-
};
18+
concept BoundReturnType =
19+
requires { requires std::same_as<I, typename T::iterator> or std::same_as<I, std::pair<typename T::iterator, typename T::iterator>>; };
2620

2721
template <typename I, typename T>
28-
concept BoundConstReturnType = requires
29-
{
30-
requires std::same_as<I, typename T::const_iterator> or std::same_as<I, std::pair<typename T::const_iterator, typename T::const_iterator>>;
31-
};
22+
concept BoundConstReturnType =
23+
requires { requires std::same_as<I, typename T::const_iterator> or std::same_as<I, std::pair<typename T::const_iterator, typename T::const_iterator>>; };
3224

33-
} // namespace morpheus::containers::concepts
25+
} // namespace morpheus::containers::concepts::detail

libraries/core/src/morpheus/core/serialisation/json_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "morpheus/core/serialisation/json_writer.hpp"
21
#include "morpheus/core/base/assert.hpp"
32
#include "morpheus/core/base/verify.hpp"
3+
#include "morpheus/core/serialisation/json_writer.hpp"
44

55
#include <rapidjson/rapidjson.h>
66

libraries/core/tests/base/verify.tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <morpheus/catch2/adapters/assert.hpp>
2-
#include <morpheus/core/base/verify.hpp>
32
#include <morpheus/core/base/scoped_action.hpp>
3+
#include <morpheus/core/base/verify.hpp>
44
#include <morpheus/redirect_stream.hpp>
55

66
#include <catch2/catch_test_macros.hpp>
@@ -51,4 +51,4 @@ TEST_CASE("Ensure assert functionality responds to appropriate defines", "[morph
5151
REQUIRE(haltFired);
5252
}
5353

54-
} // morpheus
54+
} // namespace morpheus

libraries/core/tests/conformance/stacktrace.tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "morpheus/core/conformance/stacktrace.hpp"
21
#include "morpheus/core/conformance/format.hpp"
2+
#include "morpheus/core/conformance/stacktrace.hpp"
33
#include "morpheus/core/conversion/adapters/std/stacktrace.hpp"
44

55
#include <catch2/catch_test_macros.hpp>

libraries/core/tests/conversion/adapters/std/chrono.tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "morpheus/core/conversion/adapters/std/chrono.hpp"
21
#include "morpheus/core/conformance/date.hpp"
32
#include "morpheus/core/conformance/format.hpp"
3+
#include "morpheus/core/conversion/adapters/std/chrono.hpp"
44

55
#include <catch2/catch_all.hpp>
66

libraries/core/tests/meta/concepts/scannable.tests.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "morpheus/core/meta/concepts/scannable.hpp"
21
#include "morpheus/core/conformance/ranges.hpp"
32
#include "morpheus/core/conformance/scan.hpp"
43
#include "morpheus/core/meta/concepts/scannable.hpp"

libraries/core/tests/serialisation/adapters/std/chrono.tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "morpheus/core/serialisation/adapters/std/chrono.hpp"
21
#include "morpheus/core/base/compiler.hpp"
32
#include "morpheus/core/conformance/date.hpp"
3+
#include "morpheus/core/serialisation/adapters/std/chrono.hpp"
44
#include "morpheus/core/serialisation/mock/reader.hpp"
55
#include "morpheus/core/serialisation/mock/serialisers.hpp"
66
#include "morpheus/core/serialisation/mock/writer.hpp"

0 commit comments

Comments
 (0)