lib/pronto/luacheck/wrapper.rb in pronto-luacheck-0.1.0 vs lib/pronto/luacheck/wrapper.rb in pronto-luacheck-1.0.0
- old
+ new
@@ -1,7 +1,8 @@
require 'open3'
require 'rexml/document'
+require 'shellwords'
module Pronto
module Luacheck
class Wrapper
def initialize
@@ -24,11 +25,11 @@
REXML::XPath.match(doc, '//testcase').each do |testcase|
file = testcase.attributes['classname']
next if testcase.elements.size != 1
failure = testcase.elements.first
- md = failure.attributes['message'].
- match(/\A#{Regexp.escape(file)}:(?<line>\d+):(?<column>\d+):\s+(?<message>.*)\z/)
+ md = failure.attributes['message']
+ .match(/\A#{Regexp.escape(file)}:(?<line>\d+):(?<column>\d+):\s+(?<message>.*)\z/)
next unless md
result << {
file: file,
line: md[:line].to_i,