Skip to content

Commit 7c6ecb3

Browse files
r7kamuracrowlKats
authored andcommitted
feat: add problem matchers for deno lint (#62)
(cherry picked from commit 56da422)
1 parent 01524fa commit 7c6ecb3

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

deno-problem-matchers.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "deno-lint",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\x1B\\[[0-9;]*[a-zA-Z])*(warning|warn|error)(?:\\[(\\S*)\\])?(?:\\x1B\\[[0-9;]*[a-zA-Z])*: (.*?)(?:\\x1B\\[[0-9;]*[a-zA-Z])*$",
8+
"severity": 1,
9+
"code": 2,
10+
"message": 3
11+
},
12+
{
13+
"regexp": "^(?:\\s*)(?:\\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])*$",
14+
"file": 1,
15+
"line": 2,
16+
"column": 3
17+
}
18+
]
19+
}
20+
]
21+
}

main.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import process from "node:process";
22
import core from "@actions/core";
3+
import path from "node:path";
34
import {
45
getDenoVersionFromFile,
56
parseVersionRange,
@@ -38,6 +39,12 @@ async function main() {
3839

3940
await install(version);
4041

42+
core.info(
43+
`::add-matcher::${
44+
path.join(import.meta.dirname ?? ".", "deno-problem-matchers.json")
45+
}`,
46+
);
47+
4148
core.setOutput("deno-version", version.version);
4249
core.setOutput("release-channel", version.kind);
4350

0 commit comments

Comments
 (0)