Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

catch error type by regex #35

Merged
merged 1 commit into from
Aug 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
});
});
Expand Down