Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.05 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.05 KB

Run Swift Format

This GitHub Action ensures that the Swift code adheres to a consistent coding style by running a script to check the Swift files using swift-format.

Usage

Include the action in the workflow (make sure that a Swift 5.6+ toolchain is on the PATH, on macOS, this should be given, but on Linux, it needs to be installed first, e.g., setup-swift).

Add a .swift-format file to the repository to configure the lint action. If no file is added, the default configuration will be used.

- uses: feather-actions/[email protected]

Full example:

on: [push]

jobs:
  job-name:
    runs-on: macos-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 1
  
      - name: Run Swift Format
        uses: feather-actions/[email protected]

Inputs

These are the optional inputs of the action:

swift-format-version: string input to Swift Format tag version number, default is 510.1.0