Skip to content

Commit 21366bd

Browse files
committed
Allow specifying additional arguments to pass to the docc check
We need to pass `--disable-parameters-and-returns-validation` to docc validation for swift-syntax because we don’t want to add documentation for all parameters either (see swiftlang/swift-syntax#2963).
1 parent 6b75c13 commit 21366bd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/scripts/check-docs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ done
4444
log "Checking documentation targets..."
4545
for target in $(yq -r '.builder.configs[].documentation_targets[]' .spi.yml); do
4646
log "Checking target $target..."
47-
swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed
47+
# shellcheck disable=SC2086 # We explicitly want to explode "$ADDITIONAL_DOCC_ARGUMENTS" into multiple arguments.
48+
swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed $ADDITIONAL_DOCC_ARGUMENTS
4849
done
4950

5051
log "✅ Found no documentation issues."

.github/workflows/soundness.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
type: string
2424
description: "Container image for the docs check job. Defaults to latest Swift Ubuntu image."
2525
default: "swift:6.0-noble"
26+
docs_check_additional_arguments:
27+
type: string
28+
description: "Additional arguments that should be passed to docc"
29+
default: ""
2630
unacceptable_language_check_enabled:
2731
type: boolean
2832
description: "Boolean to enable the acceptable language check job. Defaults to true."
@@ -123,6 +127,8 @@ jobs:
123127
if: ${{ inputs.linux_pre_build_command }}
124128
run: ${{ inputs.linux_pre_build_command }}
125129
- name: Run documentation check
130+
env:
131+
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }}
126132
run: |
127133
which curl yq || (apt -q update && apt -yq install curl yq)
128134
curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-docs.sh | bash

0 commit comments

Comments
 (0)