mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
# Motivation We have quite a lot of shell scripts in our repo and want to make sure that they all pass `shellcheck`. # Modification This PR adds a GH action workflow to the soundness script for `shellcheck` and fixes up all errors and warnings. # Result No more shell/bash discussions
30 lines
960 B
Bash
Executable File
30 lines
960 B
Bash
Executable File
#!/bin/bash
|
|
##===----------------------------------------------------------------------===##
|
|
##
|
|
## This source file is part of the SwiftNIO open source project
|
|
##
|
|
## Copyright (c) 2023 Apple Inc. and the SwiftNIO project authors
|
|
## Licensed under Apache License v2.0
|
|
##
|
|
## See LICENSE.txt for license information
|
|
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
##
|
|
## SPDX-License-Identifier: Apache-2.0
|
|
##
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
set -euo pipefail
|
|
|
|
log() { printf -- "** %s\n" "$*" >&2; }
|
|
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
|
|
fatal() { error "$@"; exit 1; }
|
|
|
|
raw_targets=$(sed -E -n -e 's/^.* - documentation_targets: \[(.*)\].*$/\1/p' .spi.yml)
|
|
targets=("${raw_targets//,/ }")
|
|
|
|
for target in "${targets[@]}"; do
|
|
swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed
|
|
done
|
|
|
|
log "✅ Found no documentation issues."
|