"use strict" ; function RubyLint ( opts ) { this . exe = "ruby-lint" ; this . ext = process . platform === 'win32' ? ".bat" : "" ; this . path = opts . path ; this . responsePath = "stdout" ; this . args = [ '{path}' , '-p' , 'json' ] ; if ( opts . levels ) this . args = this . args . concat ( '-l' , opts . levels . join ( ',' ) ) ; if ( opts . classes ) this . args = this . args . concat ( '-a' , opts . classes . join ( ',' ) ) ; this . settings = "ruby-lint.yml" ; this . temp = true ; } RubyLint . prototype . processResult = function ( data ) { if ( ! data ) return [ ] ; let offenses = JSON . parse ( data ) ; return offenses . map ( offense => ( { message : offense . message , severity : offense . level , location : { line : offense . line , column : offense . column , length : 0 } } ) ) ; } ; module . exports = RubyLint ;