class Pronto::Dialyxir::Wrapper

Public Class Methods

new() click to toggle source
# File lib/pronto/dialyxir/wrapper.rb, line 7
def initialize
  @stdout = run_linter
end

Public Instance Methods

lint(patch) click to toggle source
# File lib/pronto/dialyxir/wrapper.rb, line 11
def lint(patch)
  return [] if patch.nil?
  path = patch.delta.new_file[:path]
  return {} if @stdout.nil? || @stdout == 0
  OutputParser.new(path, @stdout).parse
end

Private Instance Methods

dialyxir_executable() click to toggle source
# File lib/pronto/dialyxir/wrapper.rb, line 25
def dialyxir_executable
  "mix dialyzer --quiet"
end
run_linter() click to toggle source
# File lib/pronto/dialyxir/wrapper.rb, line 20
def run_linter
  _, stderr, _ = Open3.capture3(dialyxir_executable)
  stderr
end