diff --git a/dist/matchers.json b/dist/matchers.json index 03e81cb..675fdb7 100644 --- a/dist/matchers.json +++ b/dist/matchers.json @@ -1,7 +1,7 @@ { "problemMatcher": [ { - "owner": "golangci-lint-action", + "owner": "go", "pattern": [ { "regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)", diff --git a/dist/post_run/index.js b/dist/post_run/index.js index dac8e0f..31a5702 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -5721,7 +5721,7 @@ function runLint(lintPath) { if (args.includes(`-out-format`)) { throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`); } - const cmd = `${lintPath} run ${args}`.trimRight(); + const cmd = `${lintPath} run --out-format=github-actions ${args}`.trimRight(); core.info(`Running [${cmd}] ...`); const startedAt = Date.now(); try { diff --git a/dist/run/index.js b/dist/run/index.js index 2e2a5a8..ffc8520 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -5733,7 +5733,7 @@ function runLint(lintPath) { if (args.includes(`-out-format`)) { throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`); } - const cmd = `${lintPath} run ${args}`.trimRight(); + const cmd = `${lintPath} run --out-format=github-actions ${args}`.trimRight(); core.info(`Running [${cmd}] ...`); const startedAt = Date.now(); try { diff --git a/sample/sample.go b/sample/sample.go index 50071d0..ed4b718 100644 --- a/sample/sample.go +++ b/sample/sample.go @@ -4,11 +4,18 @@ package sample import ( "crypto/md5" "encoding/hex" + "errors" ) // Hash~ func Hash(data string) string { + retError() + h := md5.New() h.Write([]byte(data)) return hex.EncodeToString(h.Sum(nil)) } + +func retError() error { + return errors.New("err") +} diff --git a/src/run.ts b/src/run.ts index 3dcd2c8..26f6a5b 100644 --- a/src/run.ts +++ b/src/run.ts @@ -55,7 +55,7 @@ async function runLint(lintPath: string): Promise { throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`) } - const cmd = `${lintPath} run ${args}`.trimRight() + const cmd = `${lintPath} run --out-format=github-actions ${args}`.trimRight() core.info(`Running [${cmd}] ...`) const startedAt = Date.now() try {