Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2 from actions/features/matcher
Add problem matcher
  • Loading branch information
Danny McCormick authored and GitHub committed Jun 27, 2019
2 parents cd65450 + 5331f86 commit 61f2387
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/go.json
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "go",
"pattern": [
{
"regexp": "^([^:]*: )?((.:)?[^:]*):(\\d+)(:(\\d+))?: (.*)$",
"file": 2,
"line": 4,
"column": 6,
"message": 7
}
]
}
]
}
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@
This action sets by Go environment for use in actions by:

- optionally downloading and caching a version of Go
- TODO: registering problem matchers for error output
- registering problem matchers for error output
- TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners)

# License
Expand Down
4 changes: 3 additions & 1 deletion lib/setup-go.js
Expand Up @@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const installer = __importStar(require("./installer"));
const path = __importStar(require("path"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
Expand All @@ -29,7 +30,8 @@ function run() {
yield installer.getGo(version);
}
// TODO: setup proxy from runner proxy config
// TODO: problem matchers registered
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`);
}
catch (error) {
core.setFailed(error.message);
Expand Down
5 changes: 4 additions & 1 deletion src/setup-go.ts
@@ -1,5 +1,6 @@
import * as core from '@actions/core';
import * as installer from './installer';
import * as path from 'path';

async function run() {
try {
Expand All @@ -13,7 +14,9 @@ async function run() {
}

// TODO: setup proxy from runner proxy config
// TODO: problem matchers registered

const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`);
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit 61f2387

Please sign in to comment.