Add problem matchers for `deno lint`

This commit is contained in:
r7kamura 2024-05-30 09:05:27 +09:00
parent 041b854f97
commit d633b1a83b
2 changed files with 24 additions and 0 deletions

View File

@ -1,5 +1,6 @@
const process = require("process");
const core = require("@actions/core");
const path = require("path");
const { parseVersionRange, resolveVersion } = require("./src/version.js");
const { install } = require("./src/install.js");
@ -33,6 +34,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);

21
problem-matchers.json Normal file
View File

@ -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
}
]
}
]
}