Forráskód Böngészése

[ue4] Prevent clang-format from reordering includes

.generated.h files must come last, but there's no way to specify this to clang-format.
badlogic 4 éve
szülő
commit
0dcdfd411d

+ 1 - 0
.clang-format

@@ -46,6 +46,7 @@ ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
 PointerAlignment: Right
 ReflowComments: false
+SortIncludes: false
 SpaceAfterCStyleCast: true
 SpaceAfterLogicalNot: false
 SpaceAfterTemplateKeyword: false

+ 1 - 0
formatters/cpp.clang-format

@@ -46,6 +46,7 @@ ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
 PointerAlignment: Right
 ReflowComments: false
+SortIncludes: false
 SpaceAfterCStyleCast: true
 SpaceAfterLogicalNot: false
 SpaceAfterTemplateKeyword: false

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Public/SpineAtlasImportFactory.h

@@ -29,9 +29,11 @@
 
 #pragma once
 
+// clang-format off
 #include "SpineAtlasAsset.h"
 #include "UnrealEd.h"
 #include "SpineAtlasImportFactory.generated.h"
+// clang-format on
 
 UCLASS()
 class USpineAtlasAssetFactory : public UFactory, public FReimportHandler {

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Public/SpineSkeletonImportFactory.h

@@ -29,9 +29,11 @@
 
 #pragma once
 
+// clang-format off
 #include "SpineAtlasAsset.h"
 #include "UnrealEd.h"
 #include "SpineSkeletonImportFactory.generated.h"
+// clang-format on
 
 UCLASS()
 class USpineSkeletonAssetFactory : public UFactory, public FReimportHandler {

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineAtlasAsset.h

@@ -29,9 +29,11 @@
 
 #pragma once
 
+// clang-format off
 #include "Engine.h"
 #include "spine/spine.h"
 #include "SpineAtlasAsset.generated.h"
+// clang-format on
 
 UCLASS(BlueprintType, ClassGroup = (Spine))
 class SPINEPLUGIN_API USpineAtlasAsset : public UObject {

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonAnimationComponent.h

@@ -29,10 +29,12 @@
 
 #pragma once
 
+// clang-format off
 #include "Components/ActorComponent.h"
 #include "SpineSkeletonComponent.h"
 #include "spine/spine.h"
 #include "SpineSkeletonAnimationComponent.generated.h"
+// clang-format on
 
 USTRUCT(BlueprintType, Category = "Spine")
 struct SPINEPLUGIN_API FSpineEvent {

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h

@@ -29,10 +29,12 @@
 
 #pragma once
 
+// clang-format off
 #include "Components/ActorComponent.h"
 #include "SpineSkeletonDataAsset.h"
 #include "spine/spine.h"
 #include "SpineSkeletonComponent.generated.h"
+// clang-format on
 
 class USpineSkeletonComponent;
 

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonDataAsset.h

@@ -29,9 +29,11 @@
 
 #pragma once
 
+// clang-format off
 #include "Engine.h"
 #include "spine/spine.h"
 #include "SpineSkeletonDataAsset.generated.h"
+// clang-format on
 
 USTRUCT(BlueprintType, Category = "Spine")
 struct SPINEPLUGIN_API FSpineAnimationStateMixData {

+ 2 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineWidget.h

@@ -29,11 +29,13 @@
 
 #pragma once
 
+// clang-format off
 #include "Runtime/UMG/Public/UMG.h"
 #include "Runtime/UMG/Public/UMGStyle.h"
 #include "SpineSkeletonDataAsset.h"
 #include "spine/spine.h"
 #include "SpineWidget.generated.h"
+// clang-format on
 
 class SSpineWidget;
 

+ 1 - 1
spine-ue4/Source/SpineUE4/MySceneComponent.h

@@ -4,8 +4,8 @@
 
 #include "Components/SceneComponent.h"
 #include "CoreMinimal.h"
-#include "SpineSkeletonRendererComponent.h"
 #include "MySceneComponent.generated.h"
+#include "SpineSkeletonRendererComponent.h"
 
 
 UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))