From 02233e522de7c95e2b1124752b5b7f42087ae6ea Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 2 Jan 2026 15:55:01 -0800 Subject: [PATCH 1/4] Add support for GitHub Actions --- .github/dependabot.yml | 6 +++ .github/scripts/format-check.sh | 48 +++++++++++++++++ .github/scripts/prebuild.ps1 | 40 ++++++++++++++ .github/scripts/prebuild.sh | 85 ++++++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 44 ++++++++++++++++ 5 files changed, 223 insertions(+) create mode 100644 .github/dependabot.yml create mode 100755 .github/scripts/format-check.sh create mode 100644 .github/scripts/prebuild.ps1 create mode 100755 .github/scripts/prebuild.sh create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..5ace4600a1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/scripts/format-check.sh b/.github/scripts/format-check.sh new file mode 100755 index 0000000000..6c515276b2 --- /dev/null +++ b/.github/scripts/format-check.sh @@ -0,0 +1,48 @@ +#!/bin/bash +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift open source project +## +## Copyright (c) 2025 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See http://swift.org/LICENSE.txt for license information +## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## + +set -euo pipefail + +fail=0 + +while IFS= read -r file; do + # Skip empty or binary files + if [ ! -s "$file" ] || [[ "$file" == *png ]] || [[ "$file" == *mlmodel ]] || [[ "$file" == *mlpackage* ]] ; then + continue + fi + + # --- Check for trailing whitespace (spaces or tabs before end of line) --- + # Using POSIX-compatible regex; no -P flag needed. + if grep -nE '[[:space:]]+$' "$file" >/dev/null; then + echo "❌ Trailing whitespace in: $file" + # Print offending lines (indent for readability) + grep -nE '[[:space:]]+$' "$file" | sed 's/^/ /' + fail=1 + fi + + # --- Check for final newline --- + # tail -c handles both GNU and BSD variants + lastchar=$(tail -c 1 "$file" | od -An -tx1 | tr -d ' \n') + if [[ "$lastchar" != "0a" ]]; then + echo "❌ Missing final newline: $file" + fail=1 + fi + +done < <(git ls-files) + +if [[ $fail -eq 0 ]]; then + echo "✅ All tracked files are clean (no trailing whitespace, final newline present)." +else + echo "⚠️ Some files failed checks." + exit 1 +fi diff --git a/.github/scripts/prebuild.ps1 b/.github/scripts/prebuild.ps1 new file mode 100644 index 0000000000..1e40dfa412 --- /dev/null +++ b/.github/scripts/prebuild.ps1 @@ -0,0 +1,40 @@ +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift open source project +## +## Copyright (c) 2025 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See http://swift.org/LICENSE.txt for license information +## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## + +param ( + [switch]$SkipAndroid, + [switch]$InstallCMake +) + +# winget isn't easily made available in containers, so use chocolatey +Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + +if ($InstallCMake) { + choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' --apply-install-arguments-to-dependencies + choco install -y ninja + + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 + refreshenv + + # Let swiftc find the path to link.exe in the CMake smoke test + $env:Path += ";$(Split-Path -Path "$(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" "-latest" -products Microsoft.VisualStudio.Product.BuildTools -find VC\Tools\MSVC\*\bin\HostX64\x64\link.exe)" -Parent)" +} + +if (-not $SkipAndroid) { + choco install -y android-ndk + + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 + refreshenv + + # Work around a bug in the package causing the env var to be set incorrectly + $env:ANDROID_NDK_ROOT = $env:ANDROID_NDK_ROOT.replace('-windows.zip','') +} diff --git a/.github/scripts/prebuild.sh b/.github/scripts/prebuild.sh new file mode 100755 index 0000000000..1cd6d3cd29 --- /dev/null +++ b/.github/scripts/prebuild.sh @@ -0,0 +1,85 @@ +#!/bin/bash +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift open source project +## +## Copyright (c) 2025 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See http://swift.org/LICENSE.txt for license information +## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## + +set -e + +if [[ $(uname) == Darwin ]] ; then + if [[ "$INSTALL_CMAKE" == "1" ]] ; then + mkdir -p "$RUNNER_TOOL_CACHE" + if ! command -v cmake >/dev/null 2>&1 ; then + curl -fsSLO https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-macos-universal.tar.gz + echo '3be85f5b999e327b1ac7d804cbc9acd767059e9f603c42ec2765f6ab68fbd367 cmake-4.1.2-macos-universal.tar.gz' > cmake-4.1.2-macos-universal.tar.gz.sha256 + sha256sum -c cmake-4.1.2-macos-universal.tar.gz.sha256 + tar -xf cmake-4.1.2-macos-universal.tar.gz + ln -s "$PWD/cmake-4.1.2-macos-universal/CMake.app/Contents/bin/cmake" "$RUNNER_TOOL_CACHE/cmake" + fi + if ! command -v ninja >/dev/null 2>&1 ; then + curl -fsSLO https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-mac.zip + echo 'da7797794153629aca5570ef7c813342d0be214ba84632af886856e8f0063dd9 ninja-mac.zip' > ninja-mac.zip.sha256 + sha256sum -c ninja-mac.zip.sha256 + unzip ninja-mac.zip + rm -f ninja-mac.zip + mv ninja "$RUNNER_TOOL_CACHE/ninja" + fi + fi +elif command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy + export DEBIAN_FRONTEND=noninteractive + + apt-get update -y + + # Build dependencies + apt-get install -y libsqlite3-dev libncurses-dev + + # Debug symbols + apt-get install -y libc6-dbg + + if [[ "$INSTALL_CMAKE" == "1" ]] ; then + apt-get install -y cmake ninja-build + fi + + # Android NDK + dpkg_architecture="$(dpkg --print-architecture)" + if [[ "$SKIP_ANDROID" != "1" ]] && [[ "$dpkg_architecture" == amd64 ]] ; then + eval "$(cat /etc/os-release)" + case "$VERSION_CODENAME" in + bookworm|jammy) + : # Not available + ;; + noble) + apt-get install -y google-android-ndk-r26c-installer + ;; + *) + echo "Unable to fetch Android NDK for unknown Linux distribution: $VERSION_CODENAME" >&2 + exit 1 + esac + else + echo "Skipping Android NDK installation on $dpkg_architecture" >&2 + fi +elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9 + dnf update -y + + # Build dependencies + dnf install -y sqlite-devel ncurses-devel + + # Debug symbols + dnf debuginfo-install -y glibc +elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2 + yum update -y + + # Build dependencies + yum install -y sqlite-devel ncurses-devel + + # Debug symbols + yum install -y yum-utils + debuginfo-install -y glibc +fi diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000000..4ace936118 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,44 @@ +name: Pull request + +permissions: + contents: read + +on: + pull_request: + types: [opened, reopened, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + name: Test + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.4 + with: + linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]' + linux_host_archs: '["x86_64", "aarch64"]' + enable_linux_static_sdk_build: true + enable_macos_checks: true + cmake-smoke-test: + name: cmake-smoke-test + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.4 + with: + linux_os_versions: '["noble"]' + linux_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh + linux_build_command: 'swift package -Xbuild-tools-swiftc -DUSE_PROCESS_SPAWNING_WORKAROUND cmake-smoke-test --disable-sandbox --cmake-path `which cmake` --ninja-path `which ninja` --extra-cmake-arg -DCMAKE_C_COMPILER=`which clang` --extra-cmake-arg -DCMAKE_CXX_COMPILER=`which clang++` --extra-cmake-arg -DCMAKE_Swift_COMPILER=`which swiftc`' + linux_swift_versions: '["nightly-main"]' + linux_host_archs: '["x86_64", "aarch64"]' + enable_macos_checks: true + macos_xcode_versions: '["26.0"]' + macos_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh + macos_build_command: 'export PATH=$PATH:$RUNNER_TOOL_CACHE && swift package cmake-smoke-test --disable-sandbox --cmake-path `which cmake` --ninja-path `which ninja` --extra-cmake-arg -DCMAKE_C_COMPILER=`which clang` --extra-cmake-arg -DCMAKE_CXX_COMPILER=`which clang++` --extra-cmake-arg -DCMAKE_Swift_COMPILER=`which swiftc`' + windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1 -SkipAndroid -InstallCMake' + windows_swift_versions: '["nightly-main"]' + windows_build_command: 'Invoke-Program swift package cmake-smoke-test --disable-sandbox --cmake-path (Get-Command cmake).Path --ninja-path (Get-Command ninja).Path --extra-cmake-arg "-DCMAKE_C_COMPILER=$((Get-Command clang).Path)" --extra-cmake-arg "-DCMAKE_CXX_COMPILER=$((Get-Command clang).Path)" --extra-cmake-arg "-DCMAKE_Swift_COMPILER=$((Get-Command swiftc).Path)" --extra-cmake-arg "-DCMAKE_STATIC_LIBRARY_PREFIX_Swift=lib" --extra-cmake-arg "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL"' + + soundness: + name: Soundness + uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.4 + with: + license_header_check_project_name: "Swift" From 2906bfcdba55286e4cbab0ae6de4095d0adecad4 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 2 Jan 2026 15:59:18 -0800 Subject: [PATCH 2/4] Limit the Swift version for Linux and Windows to nightly --- .github/workflows/pull_request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4ace936118..e0983d891c 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -18,6 +18,8 @@ jobs: with: linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]' linux_host_archs: '["x86_64", "aarch64"]' + linux_swift_versions: '["nightly-main", "nightly-6.3"]' + windows_swift_versions: '["nightly-main", "nightly-6.3"]' enable_linux_static_sdk_build: true enable_macos_checks: true cmake-smoke-test: From 65ab933b9314216284f7bd3638bf47c2cb518c11 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 2 Jan 2026 16:33:20 -0800 Subject: [PATCH 3/4] Drop cmake testing for now --- .github/workflows/pull_request.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e0983d891c..5a90afa18e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -16,29 +16,10 @@ jobs: name: Test uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.4 with: - linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]' linux_host_archs: '["x86_64", "aarch64"]' linux_swift_versions: '["nightly-main", "nightly-6.3"]' windows_swift_versions: '["nightly-main", "nightly-6.3"]' - enable_linux_static_sdk_build: true enable_macos_checks: true - cmake-smoke-test: - name: cmake-smoke-test - uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.4 - with: - linux_os_versions: '["noble"]' - linux_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh - linux_build_command: 'swift package -Xbuild-tools-swiftc -DUSE_PROCESS_SPAWNING_WORKAROUND cmake-smoke-test --disable-sandbox --cmake-path `which cmake` --ninja-path `which ninja` --extra-cmake-arg -DCMAKE_C_COMPILER=`which clang` --extra-cmake-arg -DCMAKE_CXX_COMPILER=`which clang++` --extra-cmake-arg -DCMAKE_Swift_COMPILER=`which swiftc`' - linux_swift_versions: '["nightly-main"]' - linux_host_archs: '["x86_64", "aarch64"]' - enable_macos_checks: true - macos_xcode_versions: '["26.0"]' - macos_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh - macos_build_command: 'export PATH=$PATH:$RUNNER_TOOL_CACHE && swift package cmake-smoke-test --disable-sandbox --cmake-path `which cmake` --ninja-path `which ninja` --extra-cmake-arg -DCMAKE_C_COMPILER=`which clang` --extra-cmake-arg -DCMAKE_CXX_COMPILER=`which clang++` --extra-cmake-arg -DCMAKE_Swift_COMPILER=`which swiftc`' - windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1 -SkipAndroid -InstallCMake' - windows_swift_versions: '["nightly-main"]' - windows_build_command: 'Invoke-Program swift package cmake-smoke-test --disable-sandbox --cmake-path (Get-Command cmake).Path --ninja-path (Get-Command ninja).Path --extra-cmake-arg "-DCMAKE_C_COMPILER=$((Get-Command clang).Path)" --extra-cmake-arg "-DCMAKE_CXX_COMPILER=$((Get-Command clang).Path)" --extra-cmake-arg "-DCMAKE_Swift_COMPILER=$((Get-Command swiftc).Path)" --extra-cmake-arg "-DCMAKE_STATIC_LIBRARY_PREFIX_Swift=lib" --extra-cmake-arg "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL"' - soundness: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.4 From 6d8fafe08eabfbc14a6b09788b1251226552c305 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Tue, 6 Jan 2026 13:40:00 -0800 Subject: [PATCH 4/4] Fix the unacceptable language --- Dockerfile | 2 +- .../DocCCommandLine/Action/Actions/PreviewAction.swift | 2 +- .../Checker/Checkers/NonInclusiveLanguageChecker.swift | 8 ++++---- .../Tutorials Syntax/Shared Directives/Image.md | 2 +- Sources/docc/DocCDocumentation.docc/adding-images.md | 2 +- ...ing-supplemental-content-to-a-documentation-catalog.md | 2 +- Tests/DocCCommandLineTests/SignalTests.swift | 2 +- .../Checkers/NonInclusiveLanguageCheckerTests.swift | 8 ++++---- Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift | 4 ++-- Tests/signal-test-app/main.swift | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b0f6f3e4f..f174d0966a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM swift:5.9-focal # Set up the current build user in the same way done in the Swift.org CI system: -# https://github.com/apple/swift-docker/blob/main/swift-ci/master/ubuntu/20.04/Dockerfile. +# https://github.com/apple/swift-docker/blob/main/swift-ci/main/ubuntu/20.04/Dockerfile. RUN groupadd -g 998 build-user && \ useradd -m -r -u 42 -g build-user build-user diff --git a/Sources/DocCCommandLine/Action/Actions/PreviewAction.swift b/Sources/DocCCommandLine/Action/Actions/PreviewAction.swift index 8feefca057..fb8ff27877 100644 --- a/Sources/DocCCommandLine/Action/Actions/PreviewAction.swift +++ b/Sources/DocCCommandLine/Action/Actions/PreviewAction.swift @@ -140,7 +140,7 @@ public final class PreviewAction: AsyncAction { #if !os(Linux) && !os(Android) try watch() #endif - // This will wait until the server is manually killed. + // This will wait until the server is manually terminated. try servers[serverIdentifier]!.start() previewResult = ActionResult(didEncounterError: false) } catch { diff --git a/Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift b/Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift index ea1f002c62..5ce2d8953b 100644 --- a/Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift +++ b/Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift @@ -168,13 +168,13 @@ fileprivate let builtinExcludedTerms: [NonInclusiveLanguageChecker.Term] = [ replacement: "deny list" ), NonInclusiveLanguageChecker.Term( - expression: #"master\w{0,2}"#, - message: #"Don't use "master" to describe the relationship between two devices, processes, or other things. Use an alternative that's appropriate to the context, such as "main" and "secondary" or "host" and "client"."#, + expression: #"master\w{0,2}"#, // ignore-unacceptable-language + message: #"Don't use "master" to describe the relationship between two devices, processes, or other things. Use an alternative that's appropriate to the context, such as "main" and "secondary" or "host" and "client"."#, // ignore-unacceptable-language replacement: "primary" ), NonInclusiveLanguageChecker.Term( - expression: #"slave\w{0,2}"#, - message: #"Don't use "slave" to describe the relationship between two devices, processes, or other things. Use an alternative that's appropriate to the context, such as "main" and "secondary" or "host" and "client"."#, + expression: #"slave\w{0,2}"#, // ignore-unacceptable-language + message: #"Don't use "slave" to describe the relationship between two devices, processes, or other things. Use an alternative that's appropriate to the context, such as "main" and "secondary" or "host" and "client"."#, // ignore-unacceptable-language replacement: "secondary" ), NonInclusiveLanguageChecker.Term( diff --git a/Sources/docc/DocCDocumentation.docc/Reference Syntax/Tutorials Syntax/Shared Directives/Image.md b/Sources/docc/DocCDocumentation.docc/Reference Syntax/Tutorials Syntax/Shared Directives/Image.md index b3bddddec3..37039c1bf7 100644 --- a/Sources/docc/DocCDocumentation.docc/Reference Syntax/Tutorials Syntax/Shared Directives/Image.md +++ b/Sources/docc/DocCDocumentation.docc/Reference Syntax/Tutorials Syntax/Shared Directives/Image.md @@ -21,7 +21,7 @@ Displays an image in a tutorial. The `Image` directive displays an image in your tutorial. Provide the name of an image and alternative text that describes the image in sufficient detail so screen readers can read that text aloud for people who are blind or have low-vision. ``` -@Image(source: overview-hero, alt: "An illustration of a sleeping sloth, hanging from a tree branch.”) +@Image(source: overview-hero, alt: "An illustration of a sleeping sloth, dangling from a tree branch.”) ```` Images can exist anywhere in your documentation catalog ('.docc' directory). but it's good practice to use subdirectories to organize the content and assets in your documentation. diff --git a/Sources/docc/DocCDocumentation.docc/adding-images.md b/Sources/docc/DocCDocumentation.docc/adding-images.md index f49c82a644..325465417a 100644 --- a/Sources/docc/DocCDocumentation.docc/adding-images.md +++ b/Sources/docc/DocCDocumentation.docc/adding-images.md @@ -36,7 +36,7 @@ display scale, and file extension components. Don't include the path to the image. ```markdown -![A sloth hanging off a tree.](sloth) +![A sloth dangling off a tree.](sloth) ``` diff --git a/Sources/docc/DocCDocumentation.docc/adding-supplemental-content-to-a-documentation-catalog.md b/Sources/docc/DocCDocumentation.docc/adding-supplemental-content-to-a-documentation-catalog.md index 8a3c55179c..40de14c29c 100644 --- a/Sources/docc/DocCDocumentation.docc/adding-supplemental-content-to-a-documentation-catalog.md +++ b/Sources/docc/DocCDocumentation.docc/adding-supplemental-content-to-a-documentation-catalog.md @@ -131,7 +131,7 @@ For example, to add a section about the sleeping habits of sloths to the `Sloth` ## Sleeping Habits -Sloths sleep in trees by curling into a ball and hanging by their claws. +Sloths sleep in trees by curling into a ball and dangling by their claws. ``` If the symbol's existing source documentation focuses on implementation and isn't appropriate for external documentation, you can completely replace the documentation comment's content with the extension file's content by adding a ``DocumentationExtension`` directive. diff --git a/Tests/DocCCommandLineTests/SignalTests.swift b/Tests/DocCCommandLineTests/SignalTests.swift index 2bcd26c593..bd3fd25d1d 100644 --- a/Tests/DocCCommandLineTests/SignalTests.swift +++ b/Tests/DocCCommandLineTests/SignalTests.swift @@ -28,7 +28,7 @@ class SignalTests: XCTestCase { /// Runs `signal-test-app` and confirms that it exits with code 99. /// - /// `signal-test-app` sends a kill signal to itself and uses ``Signal`` to intercept that signal + /// `signal-test-app` sends a terminate signal to itself and uses ``Signal`` to intercept that signal /// and set the exit code to 99. func testTrappingSignal() throws { let signalTestAppPath = productDirectory.appendingPathComponent("signal-test-app").path diff --git a/Tests/SwiftDocCTests/Checker/Checkers/NonInclusiveLanguageCheckerTests.swift b/Tests/SwiftDocCTests/Checker/Checkers/NonInclusiveLanguageCheckerTests.swift index 02986be62c..3c7e582517 100644 --- a/Tests/SwiftDocCTests/Checker/Checkers/NonInclusiveLanguageCheckerTests.swift +++ b/Tests/SwiftDocCTests/Checker/Checkers/NonInclusiveLanguageCheckerTests.swift @@ -17,7 +17,7 @@ struct NonInclusiveLanguageCheckerTests { @Test func matchesTermsInTitle() throws { let source = """ -# A Whitelisted title +# A Allowlisted title """ let document = Document(parsing: source) var checker = NonInclusiveLanguageChecker(sourceFile: nil) @@ -71,7 +71,7 @@ struct NonInclusiveLanguageCheckerTests { let source = """ # Title -The blacklist is in the abstract. +The denylist is in the abstract. """ let document = Document(parsing: source) var checker = NonInclusiveLanguageChecker(sourceFile: nil) @@ -96,7 +96,7 @@ The abstract. ## Overview The -master branch is the default. +main branch is the default. """ let document = Document(parsing: source) var checker = NonInclusiveLanguageChecker(sourceFile: nil) @@ -176,7 +176,7 @@ func aBlackListedFunc() { private let nonInclusiveContent = """ # Some root page - Some custom root page. And here is a ~~whitelist~~: + Some custom root page. And here is a ~~allowlist~~: - item one - item two diff --git a/Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift b/Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift index f45415aa26..953accd97d 100644 --- a/Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift +++ b/Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift @@ -2142,9 +2142,9 @@ Root // Verify that beta status was captured in the render index XCTAssertEqual(betaNodes.map(\.title), ["MyClass"]) - XCTAssert(betaNodes.allSatisfy(\.isBeta)) // Sanity check + XCTAssert(betaNodes.allSatisfy(\.isBeta)) // Consistency check XCTAssertEqual(nonBetaNodes.map(\.title).sorted(), ["Classes", "MyOtherClass", "MyThirdClass"]) - XCTAssert(nonBetaNodes.allSatisfy { $0.isBeta == false }) // Sanity check + XCTAssert(nonBetaNodes.allSatisfy { $0.isBeta == false }) // Consistency check } private func findNodesWithBetaStatus(in nodes: [RenderIndex.Node], isBeta: Bool) -> [RenderIndex.Node] { diff --git a/Tests/signal-test-app/main.swift b/Tests/signal-test-app/main.swift index 8b13823f43..1e2c17de60 100644 --- a/Tests/signal-test-app/main.swift +++ b/Tests/signal-test-app/main.swift @@ -24,7 +24,7 @@ Signal.on(Signal.all) { _ in } DispatchQueue.global().asyncAfter(deadline: .now() + 1) { - kill(getpid(), SIGABRT) + kill(getpid(), SIGABRT) # ignore-unacceptable-language } print("Signal test app running.")