From 1de720878f0e4b66bdabfc77f720bf3215016094 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 5 Jun 2020 11:05:14 +0200 Subject: .github/workflows: support errors from golangci-lint If there are compilation errors in tests, golangci-lint produces then in the following format: level=warning msg="[runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/mab_reward_test.go:26:35: cannot use rawCov (variable of type []float64) as float64 value in argument to status.Reward.RawAllTasks.Update /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/mab_reward_test.go:26:43: cannot use rawTime (variable of type []float64) as float64 value in argument to status.Reward.RawAllTasks.Update /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/mab_reward_test.go:27:38: cannot use totalReward (variable of type []float64) as float64 value in argument to status.Reward.RewardAllTasks.Update /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/mab_reward_test.go:33:2: reward declared but not used]" Transform this to github format. --- .github/workflows/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run.sh b/.github/workflows/run.sh index 0d0a6bbef..5087fd364 100755 --- a/.github/workflows/run.sh +++ b/.github/workflows/run.sh @@ -8,4 +8,5 @@ set -o pipefail # Run the specified command in syz-env and convert error messages to github format: # https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message gopath/src/github.com/google/syzkaller/tools/$1 "${@:2}" | \ + sed -E "s#/syzkaller/gopath/src/github.com/google/syzkaller/#\n#g" | \ sed -E 's#\s*([a-zA-Z0-9._/-]+):([0-9]+):(([0-9]+):)? (.+)#\0\n::error file=\1,line=\2,col=0\4::\5#' -- cgit mrf-deployment