Skip to content
Apple-ActionsPublic

About

Install a pinned SwiftLint and lint with GitHub Actions annotations

Resources

Stars

10 stars

Watchers

2 watching

Forks

Repository files navigation

SwiftLint

A GitHub Action that installs a pinned SwiftLint and runs swiftlint lint with GitHub Actions annotations. Designed to compose with the rest of the Apple-Actions suite:

Usage

Pin a version

- uses: Apple-Actions/swiftlint@v1
  with:
    version: 0.65.1

Pin from a file

Put the version on the first non-comment line of a file (for example .swiftlint-version):

0.65.1
- uses: Apple-Actions/swiftlint@v1
  with:
    version-file: .swiftlint-version

If both version and version-file are set, version wins. If neither is set, the action installs the latest SwiftLint release.

Options

- uses: Apple-Actions/swiftlint@v1
  with:
    version: 0.65.1
    strict: true
    config: .swiftlint.yml
    path: Sources
    reporter: github-actions-logging
Input Default Description
version SwiftLint version (for example 0.65.1) or latest
version-file Path to a file containing the version
strict true Pass --strict so warnings fail the step
config Path to a SwiftLint config file
path Path to lint
args Extra arguments appended to swiftlint lint
reporter github-actions-logging SwiftLint reporter
token ${{ github.token }} Token for GitHub Releases API / downloads
Output Description
version Resolved SwiftLint version that was installed
swiftlint-path Absolute path to the swiftlint binary

Works on ubuntu-* and macos-* runners (downloads the matching portable / Linux release asset).

About

Install a pinned SwiftLint and lint with GitHub Actions annotations

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages