A Danger plugin for SwifLlint.
Ruby
Latest commit 5e340ad May 24, 2017 @ashfurrow Version bump.

README.md

CircleCI

Danger SwiftLint

A Danger plugin for SwiftLint that runs on macOS.

Installation

Add this line to your Gemfile:

gem 'danger-swiftlint'

SwiftLint also needs to be installed before you run Danger, which you can do via Homebrew or a Brewfile.

Usage

The easiest way to use is just add this to your Dangerfile:

swiftlint.lint_files

That's going to lint all your Swift files. It would be better to only lint the changed or added ones, which is complicated due. Check out this issue for more details.

swiftlint.config_file = '.swiftlint.yml'
swiftlint.lint_files

If you want the lint result shows in diff instead of comment, you can use inline_mode option. Violations that out of the diff will show in danger's fail or warn section.

swiftlint.lint_files inline_mode: true

Attribution

Original structure, sequence, and organization of repo taken from danger-prose by David Grandinetti.

License

MIT