Skip to content

CassiusPacheco/action-swiftformat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action for SwiftFormat

This Action executes Nick Lockwood's SwiftFormat. The implementation and scripts were adapted from the excellent Sinoru's actions-swiftlint.

The pipeline automatically fails if the code pushed in has not been formatted and properly committed.

Usage example:

name: SwiftFormat

on:
  pull_request:
    paths:
      - '.github/workflows/swiftformat.yml'
      - '.swiftversion'
      - '.swiftformat.yml'
      - '**/*.swift'

jobs:
  SwiftFormat:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: sinoru/actions-setup-swift@v2
        with:
          swift-version: '5.6.1'
      - name: GitHub Action for SwiftFormat
        uses: CassiusPacheco/[email protected]
        with:
          swiftformat-version: '0.49.11'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages