Coder Social home page Coder Social logo

neilkimmett / danger-ruby-swiftlint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ashfurrow/danger-ruby-swiftlint

0.0 2.0 0.0 149 KB

A Danger plugin for SwifLlint.

Home Page: https://rubygems.org/gems/danger-swiftlint

License: MIT License

Ruby 100.00%

danger-ruby-swiftlint's Introduction

CircleCI

Danger SwiftLint

A Danger Ruby 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. On CI, this is done for you when the gem is installed.

Usage

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

swiftlint.lint_files

By default danger-swiftlint will lint added and modified files.

swiftlint.config_file = '.swiftlint.yml'
swiftlint.binary_path = '/path/to/swiftlint'
swiftlint.max_num_violations = 20
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

If you want different configurations on different directories, you can specify the directory. Note: Run swiftlint.lint_files per specified directory then.

swiftlint.directory = "Directory A"

If you want lint errors to fail Danger, you can use fail_on_error option.

swiftlint.lint_files fail_on_error: true

If you need to specify options for swiftlint that can only be specified by command line arguments, use the additional_swiftlint_args option.

swiftlint.lint_files additional_swiftlint_args: '--lenient'

You can use the SWIFTLINT_VERSION environment variable to override the default version installed via the rake install task.

Finally, if something's not working correctly, you can debug this plugin by using setting swiftlint.verbose = true.

Attribution

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

License

MIT

danger-ruby-swiftlint's People

Contributors

ajfigueroa avatar ashfurrow avatar austinate avatar avdlee avatar barbosa avatar caffeineflo avatar giginet avatar klaaspieter avatar leonhartx avatar marcelofabri avatar mfclarke avatar mokagio avatar neilkimmett avatar paweldudek avatar pmwiseman avatar pr0ger avatar taisukeh avatar thii avatar victorg1991 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.