Class: Jank::GolintCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/golint_command.rb

Instance Method Summary collapse

Constructor Details

#initialize(args, config, janker, executor) ⇒ GolintCommand

Returns a new instance of GolintCommand.



5
6
7
8
9
10
11
12
13
# File 'lib/golint_command.rb', line 5

def initialize(args, config, janker, executor)
  super(args, config, janker, executor)

  @golint = ENV['JANK_GOLINT'] || `which golint`.chomp
  if @golint.empty?
    STDERR.puts "golint is not installed. See https://github.com/golang/lint"
    exit(1)
  end
end

Instance Method Details

#dispatchObject



15
16
17
18
19
# File 'lib/golint_command.rb', line 15

def dispatch
  @janker.link
  @exec.execute(@golint, @args)
  @janker.sync_results
end