This Action executes SwiftLint and generates annotations from SwiftLint Violations.
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
- name: GitHub Action for SwiftLint with --strict
uses: stanfordbdhg/action-swiftlint@v4
with:
args: --strict
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: stanfordbdhg/action-swiftlint@v4
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: stanfordbdhg/action-swiftlint@v4
env:
WORKING_DIRECTORY: Source
Below is an image how this action might look like in your PR!
This project is licensed under the MIT License. See Licenses for more information.
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.