Class: Exercism::Analyzers::Golint

Inherits:
Analyzer
  • Object
show all
Defined in:
lib/exercism-analysis/analyzers/go/golint.rb

Instance Attribute Summary

Attributes inherited from Analyzer

#adapter, #processor

Instance Method Summary collapse

Methods inherited from Analyzer

#initialize, #lines, #padding, processor, #with_tempfile

Constructor Details

This class inherits a constructor from Exercism::Analyzers::Analyzer

Instance Method Details

#callObject



6
7
8
9
10
11
12
# File 'lib/exercism-analysis/analyzers/go/golint.rb', line 6

def call
  raw_result = with_tempfile('go') {|temp| adapter.execute('run', runner_path, temp.path) }
  raw_result.each_line.map do |result|
    _, line, column, reason = result.split(':')
    ThirdPartyResult.new(reason.lstrip.chomp, line, column)
  end
end