From de138e8484a28fa74a0e34e6a1ee4133563d08f3 Mon Sep 17 00:00:00 2001 From: Richard Hillmann Date: Tue, 25 Aug 2015 18:49:18 +0200 Subject: [PATCH] catch error type by regex --- lib/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index fa26573..4dd2f64 100644 --- a/lib/main.js +++ b/lib/main.js @@ -31,7 +31,7 @@ export default { provideLinter: () => { const helpers = require("atom-linter"); - const regex = /.+:(\d+):\s*(.+)/; + const regex = /.+:(\d+):\s*(.+?):\s(.+)/; return { grammarScopes: ["source.ruby", "source.ruby.rails", "source.ruby.rspec"], scope: "file", @@ -48,8 +48,8 @@ export default { } toReturn.push({ range: helpers.rangeFromLineNumber(activeEditor, Number.parseInt((matches[1] - 1))), - type: 'Error', - text: matches[2], + type: matches[2], + text: matches[3], filePath: filePath }); });