Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
shield

GitHub Action

GitHub Action for SwiftLint

2.2.0

GitHub Action for SwiftLint

shield

GitHub Action for SwiftLint

A tool to enforce Swift style and conventions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitHub Action for SwiftLint

uses: norio-nomura/[email protected]

Learn more about this action in norio-nomura/action-swiftlint

Choose a version

GitHub Action for SwiftLint

This Action executes SwiftLint and generates annotations from SwiftLint Violations by using GitHub Checks API.

Usage

An example workflow to executing SwiftLint follows:

name: CI

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
    - name: GitHub Action for SwiftLint
      uses: norio-nomura/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Secrets

  • Specifying GITHUB_TOKEN to secrets is required to using Check Run APIs for generating annotations from SwiftLint Violations.

Example

Here is an example that actually works. screenshot

Author

Norio Nomura

License

MIT