-
Notifications
You must be signed in to change notification settings - Fork 14
37 lines (28 loc) · 1.09 KB
/
swift-format.yml
File metadata and controls
37 lines (28 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Swift Format Lint
on:
pull_request:
paths:
- '**/*.swift'
- '.swift-format.json'
- '.github/workflows/swift-format.yml'
jobs:
lint:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Select Xcode 16.x for swift-format support
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 'latest-stable' # Aims for Xcode 16.x or newer
- name: Verify Xcode version and swift-format availability
run: |
echo "Active Xcode version:"
xcodebuild -version
echo "swift-format path (should be within Xcode toolchain):"
xcrun --find swift-format || echo "swift-format not found via xcrun, check Xcode version."
- name: Run swift-format lint (will fail on issues)
run: |
xcrun swift-format lint --recursive Sources Tests --ignore-unparsable-files