Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Check swift format
Browse files Browse the repository at this point in the history
  • Loading branch information
SichangHe authored Jul 26, 2023
1 parent 12788c3 commit edbdf96
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/swiftformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
paths:
- '.github/workflows/swiftformat.yml'
- '**.swift'
jobs:
swiftformat:
runs-on: macos-latest
name: Check swiftformat
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Swift tools
run: |
curl -LO https://github.com/nicklockwood/SwiftFormat/releases/download/0.51.13/swiftformat.zip
unzip swiftformat
- name: Format Swift code
run: ./swiftformat --verbose .
- name: Verify formatted code is unchanged
run: |
rm -rf __MACOSX swiftformat swiftformat.zip
git diff --exit-code HEAD

0 comments on commit edbdf96

Please sign in to comment.