Skip to content

SwiftLint Tool

Actions
A tool to enforce Swift style and conventions using the official image
v4.0.0
Latest
Star (3)

GitHub Action for SwiftLint

This Action executes SwiftLint and generates annotations from SwiftLint Violations.

Usage

An example workflow(.github/workflows/swiftlint.yml) to executing SwiftLint follows:

name: SwiftLint

on:
  pull_request:

jobs:
  SwiftLint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: GitHub Action for SwiftLint
        uses: stanfordbdhg/action-swiftlint@v4

Supply arguments

      - name: GitHub Action for SwiftLint with --strict
        uses: stanfordbdhg/action-swiftlint@v4
        with:
          args: --strict

Only apply to changed files in PR

      - name: GitHub Action for SwiftLint (Only files changed in the PR)
        uses: stanfordbdhg/action-swiftlint@v4
        env:
          DIFF_BASE: ${{ github.base_ref }}

Modify the working directory

      - name: GitHub Action for SwiftLint (Different working directory)
        uses: stanfordbdhg/action-swiftlint@v4
        env:
          WORKING_DIRECTORY: Source

Example

Below is an image how this action might look like in your PR!

screenshot

License

This project is licensed under the MIT License. See Licenses for more information.

Contributors

This project is developed as part of the Stanford Byers Center for Biodesign at Stanford University based on work done by Norio Nomura. See CONTRIBUTORS.md for a full list of all action-swiftlint contributors.

Stanford Byers Center for Biodesign Logo Stanford Byers Center for Biodesign Logo

SwiftLint Tool is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

A tool to enforce Swift style and conventions using the official image
v4.0.0
Latest

SwiftLint Tool is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.