Skip to content

GitHub Action for SwiftLint using the official SwiftLint Docker image.

License

Notifications You must be signed in to change notification settings

StanfordBDHG/action-swiftlint

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Repository files navigation

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

About

GitHub Action for SwiftLint using the official SwiftLint Docker image.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 79.6%
  • Shell 15.7%
  • Dockerfile 4.7%