require 'swiftrail' module Danger # This is your plugin class. Any attributes or methods you expose here will # be available from within your Dangerfile. # # To be published on the Danger plugins site, you will need to have # the public interface documented. Danger uses [YARD](http://yardoc.org/) # for generating documentation from your plugin source, and you can verify # by running `danger plugins lint` or `bundle exec rake spec`. # # You should replace these comments with a public description of your library. # # @example Ensure people are well warned about merging on Mondays # # my_plugin.warn_on_mondays # # @see Slavko Krucaj/danger-swiftrail # @tags monday, weekends, time, rattata # class DangerSwiftrail < Plugin # An attribute that you can read/write from your Dangerfile # # @return [Array<String>] attr_accessor :failures def lint(test_patterns) @failures = Swiftrail::Swift::Lint.new(test_patterns).lint end end end