Skip to content

Commit d4a961b

Browse files
authored
Add trailing newlines consistently in InitPackage.swift (#7013)
`swift package init` creates files without a trailing newline, so if you create a git repository when instantiating the template, there is an immediate diff. Resolves rdar://111333801.
1 parent e793e02 commit d4a961b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Workspace/InitPackage.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ public final class InitPackage {
573573
print("Hello, world!")
574574
}
575575
}
576+
576577
"""
577578
case .macro:
578579
content = """
@@ -587,6 +588,7 @@ public final class InitPackage {
587588
/// produces a tuple `(x + y, "x + y")`.
588589
@freestanding(expression)
589590
public macro stringify<T>(_ value: T) -> (T, String) = #externalMacro(module: "\(moduleName)Macros", type: "StringifyMacro")
591+
590592
"""
591593

592594
case .empty, .buildToolPlugin, .commandPlugin:

0 commit comments

Comments
 (0)