Merge pull request #6 from golangci/feature/annotations
Fix annotations
This commit is contained in:
commit
eda878dc56
2
dist/matchers.json
vendored
2
dist/matchers.json
vendored
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
{
|
{
|
||||||
"owner": "golangci-lint-action",
|
"owner": "go",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)",
|
"regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)",
|
||||||
|
2
dist/post_run/index.js
vendored
2
dist/post_run/index.js
vendored
@ -5721,7 +5721,7 @@ function runLint(lintPath) {
|
|||||||
if (args.includes(`-out-format`)) {
|
if (args.includes(`-out-format`)) {
|
||||||
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
|
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}] ...`);
|
core.info(`Running [${cmd}] ...`);
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
try {
|
try {
|
||||||
|
2
dist/run/index.js
vendored
2
dist/run/index.js
vendored
@ -5733,7 +5733,7 @@ function runLint(lintPath) {
|
|||||||
if (args.includes(`-out-format`)) {
|
if (args.includes(`-out-format`)) {
|
||||||
throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`);
|
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}] ...`);
|
core.info(`Running [${cmd}] ...`);
|
||||||
const startedAt = Date.now();
|
const startedAt = Date.now();
|
||||||
try {
|
try {
|
||||||
|
@ -4,11 +4,18 @@ package sample
|
|||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Hash~
|
// Hash~
|
||||||
func Hash(data string) string {
|
func Hash(data string) string {
|
||||||
|
retError()
|
||||||
|
|
||||||
h := md5.New()
|
h := md5.New()
|
||||||
h.Write([]byte(data))
|
h.Write([]byte(data))
|
||||||
return hex.EncodeToString(h.Sum(nil))
|
return hex.EncodeToString(h.Sum(nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func retError() error {
|
||||||
|
return errors.New("err")
|
||||||
|
}
|
||||||
|
@ -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`)
|
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}] ...`)
|
core.info(`Running [${cmd}] ...`)
|
||||||
const startedAt = Date.now()
|
const startedAt = Date.now()
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user