Skip to content

release: Blueprint 5.1.0 #1157

release: Blueprint 5.1.0

release: Blueprint 5.1.0 #1157

Workflow file for this run

name: Linter
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Lint Swift code with SwiftFormat
runs-on: macos-14-xlarge
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read env
run: cat .github/workflows/env.properties >> $GITHUB_ENV
- name: Switch to Xcode ${{ env.xcode_version }}
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
- name: Cache SPM build
uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Run SwiftFormat
run: |
swift run -c release swiftformat --lint .
- name: Report error
if: ${{ failure() }}
run: |
echo '::error::SwiftFormat linting failed. Run `Scripts/swiftformat` to format your code.'