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

Commit 5dc2f2e

Browse files
committed
Merge pull request #35 from Project0/master
catch error type by regex
2 parents c335bce + de138e8 commit 5dc2f2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/main.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131

3232
provideLinter: () => {
3333
const helpers = require("atom-linter");
34-
const regex = /.+:(\d+):\s*(.+)/;
34+
const regex = /.+:(\d+):\s*(.+?):\s(.+)/;
3535
return {
3636
grammarScopes: ["source.ruby", "source.ruby.rails", "source.ruby.rspec"],
3737
scope: "file",
@@ -48,8 +48,8 @@ export default {
4848
}
4949
toReturn.push({
5050
range: helpers.rangeFromLineNumber(activeEditor, Number.parseInt((matches[1] - 1))),
51-
type: 'Error',
52-
text: matches[2],
51+
type: matches[2],
52+
text: matches[3],
5353
filePath: filePath
5454
});
5555
});

0 commit comments

Comments
 (0)