Skip to content

disable trailing commas formatting #100

disable trailing commas formatting

disable trailing commas formatting #100

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
swift-format:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Run SwiftFormat with License Header
run: |
# Read LICENSE file, add `// ` before each line.
LICENSE_BLOCK=$(sed 's/^/\/\/ /' LICENSE)
swiftformat . --header "$LICENSE_BLOCK" --disable trailingCommas
- name: Commit and Push Changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
if ! git diff --quiet --staged; then
git commit -m "Apply SwiftFormat"
git push origin main
else
echo "No changes to commit"
fi