Sha256: 8f8700cdc9d97a6ac08d5fc3d61e7dad4d8ad2c9c4249e60fcf983f09918dfb0

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

[![CircleCI](https://circleci.com/gh/ashfurrow/danger-swiftlint.svg?style=svg)](https://circleci.com/gh/ashfurrow/danger-swiftlint)

# Danger SwiftLint

A [Danger](https://github.com/danger/danger) plugin for [SwiftLint](https://github.com/realm/SwiftLint).

## Installation

Add this line to your Gemfile:

```rb
gem 'danger-swiftlint'
```

## Usage

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

```rb
swiftlint.lint_files
```

That will lint any changed or added Swift files in the PR. You can also set up a config file first.

```rb
swiftlint.config_file = '.swiftlint.yml'
swiftlint.lint_files
```

And finally, you can provide a list of files manually:

``` ruby
# Look through all changed Swift files
swift_files = (modified_files + added_files).select do |file|
  file.end_with?(".swift")
end

swiftlint.lint_files swift_files
```

## Attribution

Original structure, sequence, and organization of repo taken from [danger-prose](https://github.com/dbgrandi/danger-prose) by [David Grandinetti](https://github.com/dbgrandi/).

## License

MIT

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danger-swiftlint-0.1.2 README.md