From 90649c15346509b04f8a57f7497112a82c397817 Mon Sep 17 00:00:00 2001 From: Neemias Almeida Date: Tue, 28 May 2024 11:13:52 +0200 Subject: [PATCH] fix: add golangci-lint setup action and fix lint issue --- .github/workflows/build.yml | 9 ++++++--- runner/proxy.go | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6cd20933..d8037db5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,11 +20,14 @@ jobs: uses: actions/setup-go@v4 with: go-version: ^1.22 - - - name: Build - run: make build + - name: Install golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 - name: Install dependency run: if [ $(uname) == "Darwin" ]; then brew install gnu-sed ;fi + - name: Build + run: make build - name: Run unit tests run: go install github.com/go-delve/delve/cmd/dlv@latest && go test ./... -v -covermode=count -coverprofile=coverage.txt - name: Upload Coverage report to CodeCov diff --git a/runner/proxy.go b/runner/proxy.go index af3aca0f..3d361382 100644 --- a/runner/proxy.go +++ b/runner/proxy.go @@ -34,7 +34,7 @@ func NewProxy(cfg *cfgProxy) *Proxy { Addr: fmt.Sprintf(":%d", cfg.ProxyPort), }, client: &http.Client{ - CheckRedirect: func(req *http.Request, via []*http.Request) error { + CheckRedirect: func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }, },