Skip to content

Commit 5034055

Browse files
leogdionclaude
andcommitted
fix: resolve linting script issues in CI
- Rename malformed validate-docs script (Scripts/"?|.sh -> Scripts/validate-docs.sh) - Fix bash syntax error: remove invalid 'local' declaration outside function - Improve Linux compatibility: replace readlink -f with portable alternative - Disable build jobs temporarily to speed up linting CI validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent eb49730 commit 5034055

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/SyntaxKit.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Build on Ubuntu
1111
runs-on: ubuntu-latest
1212
container: ${{ matrix.swift.nightly && format('swiftlang/swift:nightly-{0}-{1}', matrix.swift.version, matrix.os) || format('swift:{0}-{1}', matrix.swift.version, matrix.os) }}
13-
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
13+
if: false
1414
strategy:
1515
matrix:
1616
os: [noble, jammy]
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
PACKAGE_NAME: SyntaxKit
4343
runs-on: ${{ matrix.runs-on }}
44-
if: "!contains(github.event.head_commit.message, 'ci skip')"
44+
if: false
4545
strategy:
4646
fail-fast: false
4747
matrix:
@@ -125,7 +125,6 @@ jobs:
125125
name: Linting
126126
if: "!contains(github.event.head_commit.message, 'ci skip')"
127127
runs-on: ubuntu-latest
128-
needs: [build-ubuntu, build-macos]
129128
env:
130129
MINT_PATH: .mint/lib
131130
MINT_LINK_PATH: .mint/bin

Scripts/lint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo "LintMode: $LINT_MODE"
2121

2222
# More portable way to get script directory
2323
if [ -z "$SRCROOT" ]; then
24-
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
24+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
2525
PACKAGE_DIR="${SCRIPT_DIR}/.."
2626
else
2727
PACKAGE_DIR="${SRCROOT}"
@@ -86,7 +86,7 @@ if [ -z "$SKIP_DOCS" ]; then
8686

8787
# DocC generation with warnings as errors
8888
echo "Generating DocC documentation (warnings as errors)..."
89-
local docc_output=$(mktemp)
89+
docc_output=$(mktemp)
9090
if ! swift package generate-documentation --warnings-as-errors 2>"$docc_output"; then
9191
echo "❌ DocC generation failed due to warnings or errors"
9292
echo "🔍 Error details:"

Scripts/"?|.sh renamed to Scripts/validate-docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ echo "════════════════════════
1717

1818
# More portable way to get script directory
1919
if [ -z "$SRCROOT" ]; then
20-
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
20+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
2121
PACKAGE_DIR="${SCRIPT_DIR}/.."
2222
else
2323
PACKAGE_DIR="${SRCROOT}"
@@ -217,7 +217,7 @@ validate_api_coverage() {
217217

218218
# More portable way to get script directory
219219
if [ -z "$SRCROOT" ]; then
220-
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
220+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
221221
PACKAGE_DIR="${SCRIPT_DIR}/.."
222222
else
223223
PACKAGE_DIR="${SRCROOT}"

0 commit comments

Comments
 (0)