Skip to content

Commit

Permalink
Add problem matchers for deno lint
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Nov 27, 2024
1 parent 1c4873e commit 6ec544a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
21 changes: 21 additions & 0 deletions deno-problem-matchers.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
}
9 changes: 9 additions & 0 deletions main.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import process from "node:process";
import core from "@actions/core";
import path from "node:path";
import {
getDenoVersionFromFile,
parseVersionRange,
Expand Down Expand Up @@ -38,6 +39,14 @@ async function main() {

await install(version);

if (import.meta.dirname) {
core.info(
`::add-matcher::${
path.join(import.meta.dirname, "deno-problem-matchers.json")
}`,
);
}

core.setOutput("deno-version", version.version);
core.setOutput("release-channel", version.kind);

Expand Down

0 comments on commit 6ec544a

Please sign in to comment.