diff --git a/main.js b/main.js index 33574a0..c60089c 100644 --- a/main.js +++ b/main.js @@ -1,5 +1,6 @@ const process = require("process"); const core = require("@actions/core"); +const path = require("path"); const { parseVersionRange, @@ -43,6 +44,8 @@ async function main() { await install(version); + core.info(`::add-matcher::${path.join(__dirname, "problem-matchers.json")}`); + core.setOutput("deno-version", version.version); core.setOutput("is-canary", version.isCanary); diff --git a/problem-matchers.json b/problem-matchers.json new file mode 100644 index 0000000..65bc3f0 --- /dev/null +++ b/problem-matchers.json @@ -0,0 +1,21 @@ +{ + "problemMatcher": [ + { + "owner": "deno-lint", + "pattern": [ + { + "regexp": "^(?:\\x1B\\[[0-9;]*[a-zA-Z])*(warning|warn|error)(?:\\[(\\S*)\\])?(?:\\x1B\\[[0-9;]*[a-zA-Z])*: (.*?)(?:\\x1B\\[[0-9;]*[a-zA-Z])*$", + "severity": 1, + "code": 2, + "message": 3 + }, + { + "regexp": "^ (?:\\x1B\\[[0-9;]*[a-zA-Z])*-->(?:\\x1B\\[[0-9;]*[a-zA-Z])* (?:\\x1B\\[[0-9;]*[a-zA-Z])*(\\S+?)(?:\\x1B\\[[0-9;]*[a-zA-Z])*:(\\d+):(\\d+)(?:\\x1B\\[[0-9;]*[a-zA-Z])*$", + "file": 1, + "line": 2, + "column": 3 + } + ] + } + ] +}