Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/Workspace/InitPackage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ public final class InitPackage {
func createBuildCommand(for inputPath: URL, in outputDirectoryPath: URL, with generatorToolPath: URL) -> Command? {
// Skip any file that doesn't have the extension we're looking for (replace this with the actual one).
guard inputPath.pathExtension == "my-input-suffix" else { return .none }

// Return a command that will run during the build to generate the output file.
let inputName = inputPath.lastPathComponent
let outputName = inputPath.deletingPathExtension().lastPathComponent + ".swift"
Expand Down Expand Up @@ -644,7 +644,7 @@ public final class InitPackage {
content = """
// The Swift Programming Language
// https://docs.swift.org/swift-book
//
//
// Swift Argument Parser
// https://swiftpackageindex.com/apple/swift-argument-parser/documentation

Expand Down Expand Up @@ -731,6 +731,8 @@ public final class InitPackage {

@Test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
// Swift Testing Documentation
// https://developer.apple.com/documentation/testing
Copy link
Contributor

@bkhouri bkhouri Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (blocking): I love this and completely support it. Though,I have been disappointed (for a lack of a better word) previously while inspecting the Apple XCTest documentation when targeting non-Apple devices as the XCTest API is not identical on macOS and Linux. Although I suspect this is not the case with Swift Testing, my experience has lead me to not have confidence that the developer.apple.com documentation will be valid on non-apple platforms.

Can the link point to the Swift.org Swift Testing API. If that documentation is not published, I would say updating the template is gating upon that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though,I have been disappointed (for a lack of a better word) previously while inspecting the Apple XCTest documentation when targeting non-Apple devices as the XCTest API is not identical on macOS and Linux.

Feel free to open a PR, although I have no idea where you'd do so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the link point to the Swift.org Swift Testing API. If that documentation is not published, I would say updating the template is gating upon that.

Could we link to swiftpackageindex.com? There's a copy of the documentation hosted there.

}

"""
Expand Down