Skip to content

Commit e36ce1d

Browse files
tabs or spaces
1 parent 89c89c5 commit e36ce1d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

__tests__/setup-go.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ describe('setup-go', () => {
379379
expect(annotation.message).toBe('missing return at end of function');
380380
});
381381

382-
it('matches on unix path with whitespace', async () => {
382+
it('matches on unix path with spaces', async () => {
383383
let line = ' ./assert.go:5:2: missing return at end of function ';
384384
let annotation = testMatch(line);
385385
expect(annotation).toBeDefined();
@@ -389,6 +389,16 @@ describe('setup-go', () => {
389389
expect(annotation.message).toBe('missing return at end of function');
390390
});
391391

392+
it('matches on unix path with tabs', async () => {
393+
let line = '\t./assert.go:5:2: missing return at end of function ';
394+
let annotation = testMatch(line);
395+
expect(annotation).toBeDefined();
396+
expect(annotation.line).toBe(5);
397+
expect(annotation.column).toBe(2);
398+
expect(annotation.file).toBe('./assert.go');
399+
expect(annotation.message).toBe('missing return at end of function');
400+
});
401+
392402
it('matches on relative windows path', async () => {
393403
let line = '.\\main.go:13:2: undefined: fmt.Printl';
394404
let annotation = testMatch(line);
@@ -409,16 +419,6 @@ describe('setup-go', () => {
409419
expect(annotation.message).toBe('undefined: fmt.Printl');
410420
});
411421

412-
it('only matches leading dots on unix path', async () => {
413-
let line = 'x./assert.go:5:2: missing return at end of function';
414-
let annotation = testMatch(line);
415-
expect(annotation).toBeDefined();
416-
expect(annotation.line).toBe(5);
417-
expect(annotation.column).toBe(2);
418-
expect(annotation.file).toBe('./assert.go');
419-
expect(annotation.message).toBe('missing return at end of function');
420-
});
421-
422422
// 1.13.1 => 1.13.1
423423
// 1.13 => 1.13.0
424424
// 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1

matchers.json

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

0 commit comments

Comments
 (0)