Sign inSign up

mtgto/swift-format-action

By mtgto

•Updated almost 4 years ago

Image
0

10K+

mtgto/swift-format-action repository overview

⁠swift-format-action

GitHub Action to run apple/swift-format⁠.

⁠GitHub Action Workflow Examples

⁠Lint only

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
        with:
          # Full git history is needed to get a proper list of changed files
          fetch-depth: 0
      - name: Lint
        uses: mtgto/swift-format-action@main
        with:
          # Please comment out if you won't specify configuration file
          configuration_file: .swift-format
          # default is false
          all_files: false
          # default is -1 (infinity)
          max_warnings: -1

⁠Format code automatically

on:
  pull_request:
    branches: [main]

jobs:
  lint:
    name: Auto Correct
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
        with:
          # Full git history is needed to get a proper list of changed files
          fetch-depth: 0
      - name: Lint
        uses: mtgto/swift-format-action@main
        with:
          # Please comment out if you won't specify configuration file
          configuration_file: .swift-format
          # default is false
          all_files: false
          # default is false
          auto_correct: true
          # default is -1 (infinity)
          max_warnings: -1

⁠License

MIT License

Tag summary

Content type

Image

Digest

sha256:cf4b6bec5…

Size

160.4 MB

Last updated

almost 4 years ago

docker pull mtgto/swift-format-action