No commit activity in last 3 years
No release in over 3 years
A Danger plugin for displaying SwiftLint issues in your pull request
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 2.14
= 3.0.7
>= 0
~> 10.0
~> 3.4
~> 0.8

Runtime

>= 0
 Project Readme

swiftlint

Surface your SwiftLint JSON report in pull requests. If no report exists, one will be created using the existing SwiftLint install. Results are displayed in a markdown table.

Run report
# Runs SwiftLint if necessary and processes the report using the default settings
swiftlint.report
Run a report with a specific report file
# Assumes your path starts in the present directory
swiftlint.report 'path/to/report.json'
Run a report, ignoring warnings
swiftlint.enabled_types = [:error]
swiftlint.report
Run a report, defining custom warning emoji
swiftlint.issue_emoji[:warning] = '❓'
swiftlint.report

Attributes

enabled_types - Allows you to set which issue types are displayed. Defaults to [:warning", :error]

issue_emoji - Allows configuration of which emoji is shown for an issue type. Defaults to {:warning: '⚠', :error: '❌'}

Methods

report - Lint an existing report or have one generated. Will fail if swiftlint is not installed. Generates a markdown list of warnings and errors from the JSON report, linking to each issue's line in the PR. Does nothing when there are no valid issues to raise.

swiftlint_installed? - Determine if swiftlint is currently installed in the system paths.