Skip to content

Commit afb783b

Browse files
committed
Update swift-java.config docs generator and docs
1 parent edd0ca5 commit afb783b

11 files changed

Lines changed: 1682 additions & 12 deletions

File tree

‎.github/scripts/validate_docs.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
set -e
44
set -x
55

6+
swift run generate-config-docs --check
7+
68
DEPENDENCY='.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0")'
79

810
if grep -q "$DEPENDENCY" Package.swift; then

‎Package.swift‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,23 @@ let package = Package(
429429
]
430430
),
431431

432+
// Dev-time tool: regenerates the "Supported configuration options" table in
433+
// `Sources/SwiftJavaDocumentation/Documentation.docc/SwiftJavaConfigFile.md`
434+
// straight from the doc comments on `Configuration.swift` and the enums it
435+
// references, so the two never drift apart.
436+
//
437+
// Run manually via `swift run generate-config-docs`; CI validates freshness
438+
// with `swift run generate-config-docs --check`.
439+
.executableTarget(
440+
name: "generate-config-docs",
441+
dependencies: [
442+
.product(name: "SwiftParser", package: "swift-syntax"),
443+
.product(name: "SwiftSyntax", package: "swift-syntax"),
444+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
445+
],
446+
path: "Sources/GenerateConfigDocs"
447+
),
448+
432449
.plugin(
433450
name: "_StaticBuildConfigPlugin",
434451
capability: .buildTool(),

0 commit comments

Comments
 (0)