Merge pull request #6 from golangci/feature/annotations

Fix annotations
This commit is contained in:
Isaev Denis 2020-05-04 19:50:34 +03:00 committed by GitHub
commit eda878dc56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 4 deletions

2
dist/matchers.json vendored
View File

@ -1,7 +1,7 @@
{
"problemMatcher": [
{
"owner": "golangci-lint-action",
"owner": "go",
"pattern": [
{
"regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)",

View File

@ -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 {

2
dist/run/index.js vendored
View File

@ -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 {

View File

@ -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")
}

View File

@ -55,7 +55,7 @@ async function runLint(lintPath: string): Promise<void> {
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 {