Compare commits

...

4 Commits

Author SHA1 Message Date
ce34998f1f dev: rename main workflow name 2020-05-04 19:54:26 +03:00
1e4a1137a8 dev: fix badge url 2020-05-04 19:53:07 +03:00
eda878dc56 Merge pull request #6 from golangci/feature/annotations
Fix annotations
2020-05-04 19:50:34 +03:00
f7d08adb03 Fix problems parsing 2020-05-04 19:48:51 +03:00
7 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
name: "build-test"
name: "build-and-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:

View File

@ -1,6 +1,6 @@
# golangci-lint-action
[![Build Status](https://github.com/golangci/golangci-lint-action/workflows/test/badge.svg)](https://github.com/golangci/golangci-lint-action/actions)
[![Build Status](https://github.com/golangci/golangci-lint-action/workflows/build-and-test/badge.svg)](https://github.com/golangci/golangci-lint-action/actions)
![GitHub Annotations](./static/annotations.png)

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 {