Class: Danger::PluginLint

Inherits:
PluginAbstract show all
Defined in:
lib/danger/commands/plugins/plugin_lint.rb

Instance Attribute Summary

Attributes inherited from Runner

#cork

Instance Method Summary collapse

Methods inherited from Runner

options, #post_results, report_error, #validate!

Constructor Details

#initialize(argv) ⇒ PluginLint

Returns a new instance of PluginLint.



10
11
12
13
# File 'lib/danger/commands/plugins/plugin_lint.rb', line 10

def initialize(argv)
  @refs = argv.arguments! unless argv.arguments.empty?
  super
end

Instance Method Details

#runObject



27
28
29
30
31
32
33
34
35
# File 'lib/danger/commands/plugins/plugin_lint.rb', line 27

def run
  file_resolver = PluginFileResolver.new(@refs)
  paths = file_resolver.resolve_to_paths

  parser = PluginParser.new(paths)
  parser.parse
  json = parser.to_json
  cork.puts json
end