Skip to content

Commit fdeec47

Browse files
authored
Don't require relative paths to start with ./ or ../ (#98)
1 parent 3e9d548 commit fdeec47

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

__tests__/setup-go.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,16 @@ describe('setup-go', () => {
497497
expect(annotation.message).toBe('undefined: fmt.Printl');
498498
});
499499

500+
it('matches on unix path down the tree', async () => {
501+
let line = 'foo/main.go:13:2: undefined: fmt.Printl';
502+
let annotation = testMatch(line);
503+
expect(annotation).toBeDefined();
504+
expect(annotation.line).toBe(13);
505+
expect(annotation.column).toBe(2);
506+
expect(annotation.file).toBe('foo/main.go');
507+
expect(annotation.message).toBe('undefined: fmt.Printl');
508+
});
509+
500510
it('matches on rooted unix path', async () => {
501511
let line = '/assert.go:4:1: missing return at end of function';
502512
let annotation = testMatch(line);

matchers.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"owner": "go",
55
"pattern": [
66
{
7-
"regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)",
7+
"regexp": "^\\s*(.+\\.go):(?:(\\d+):(\\d+):)? (.*)",
88
"file": 1,
99
"line": 2,
1010
"column": 3,
@@ -13,4 +13,4 @@
1313
]
1414
}
1515
]
16-
}
16+
}

0 commit comments

Comments
 (0)