3
0
Fork 0
mirror of https://gitea.com/actions/setup-go.git synced 2024-11-24 02:29:33 +01:00

Don't require relative paths to start with ./ or ../ (#98)

This commit is contained in:
Dominik Honnef 2021-12-17 16:47:05 +01:00 committed by GitHub
parent 3e9d5483e6
commit fdeec47002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -497,6 +497,16 @@ describe('setup-go', () => {
expect(annotation.message).toBe('undefined: fmt.Printl'); expect(annotation.message).toBe('undefined: fmt.Printl');
}); });
it('matches on unix path down the tree', async () => {
let line = 'foo/main.go:13:2: undefined: fmt.Printl';
let annotation = testMatch(line);
expect(annotation).toBeDefined();
expect(annotation.line).toBe(13);
expect(annotation.column).toBe(2);
expect(annotation.file).toBe('foo/main.go');
expect(annotation.message).toBe('undefined: fmt.Printl');
});
it('matches on rooted unix path', async () => { it('matches on rooted unix path', async () => {
let line = '/assert.go:4:1: missing return at end of function'; let line = '/assert.go:4:1: missing return at end of function';
let annotation = testMatch(line); let annotation = testMatch(line);

View file

@ -4,7 +4,7 @@
"owner": "go", "owner": "go",
"pattern": [ "pattern": [
{ {
"regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)", "regexp": "^\\s*(.+\\.go):(?:(\\d+):(\\d+):)? (.*)",
"file": 1, "file": 1,
"line": 2, "line": 2,
"column": 3, "column": 3,