Skip to content

Commit eda878d

Browse files
authored
Merge pull request #6 from golangci/feature/annotations
Fix annotations
2 parents b030249 + f7d08ad commit eda878d

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

dist/matchers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"problemMatcher": [
33
{
4-
"owner": "golangci-lint-action",
4+
"owner": "go",
55
"pattern": [
66
{
77
"regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)",

dist/post_run/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5721,7 +5721,7 @@ function runLint(lintPath) {
57215721
if (args.includes(`-out-format`)) {
57225722
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
57235723
}
5724-
const cmd = `${lintPath} run ${args}`.trimRight();
5724+
const cmd = `${lintPath} run --out-format=github-actions ${args}`.trimRight();
57255725
core.info(`Running [${cmd}] ...`);
57265726
const startedAt = Date.now();
57275727
try {

dist/run/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5733,7 +5733,7 @@ function runLint(lintPath) {
57335733
if (args.includes(`-out-format`)) {
57345734
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
57355735
}
5736-
const cmd = `${lintPath} run ${args}`.trimRight();
5736+
const cmd = `${lintPath} run --out-format=github-actions ${args}`.trimRight();
57375737
core.info(`Running [${cmd}] ...`);
57385738
const startedAt = Date.now();
57395739
try {

sample/sample.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ package sample
44
import (
55
"crypto/md5"
66
"encoding/hex"
7+
"errors"
78
)
89

910
// Hash~
1011
func Hash(data string) string {
12+
retError()
13+
1114
h := md5.New()
1215
h.Write([]byte(data))
1316
return hex.EncodeToString(h.Sum(nil))
1417
}
18+
19+
func retError() error {
20+
return errors.New("err")
21+
}

src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function runLint(lintPath: string): Promise<void> {
5555
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`)
5656
}
5757

58-
const cmd = `${lintPath} run ${args}`.trimRight()
58+
const cmd = `${lintPath} run --out-format=github-actions ${args}`.trimRight()
5959
core.info(`Running [${cmd}] ...`)
6060
const startedAt = Date.now()
6161
try {

0 commit comments

Comments
 (0)