Skip to content

[clang-format] "SpaceInEmptyBlock: true" is not respected in C# #84695

@hermesonbf

Description

@hermesonbf

How to reproduce:

1 - Create a file .clang-format with the following content: "SpaceInEmptyBlock: true"

2 - Run clang-format in the following C# code, it will format to "new string[] {}" instead of "new string[] { }" as it should be.

using UnrealBuildTool;

public class GameProject : ModuleRules {
  public GameProject(ReadOnlyTargetRules Target) : base(Target) {
    PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
    PublicDependencyModuleNames.AddRange(new string[] { "Core" });
    PrivateDependencyModuleNames.AddRange(new string[] {});
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions