Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 2.22 KB

README.md

File metadata and controls

77 lines (52 loc) · 2.22 KB

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