From fe419e18b8242e472de537716d48082e106131a3 Mon Sep 17 00:00:00 2001 From: GabrielePuliti <12409541+Wabri@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:05:49 +0200 Subject: [PATCH 1/4] fix(workflows): update version of golangci-lint-action --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 522decf..598ed4c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,8 +22,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v6 with: version: latest only-new-issues: false - args: --timeout 2m --config .golangci.yaml \ No newline at end of file + args: --timeout 2m --config .golangci.yaml From 9a49f673c2bd71b196fdb88a3d37b0cdf6d06415 Mon Sep 17 00:00:00 2001 From: GabrielePuliti <12409541+Wabri@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:44:58 +0200 Subject: [PATCH 2/4] fix(golangci): solve warnings --- .golangci.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 5aaed94..9e59caf 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,6 +1,6 @@ linters-settings: govet: - check-shadowing: true + shadow: true golint: min-confidence: 0 maligned: @@ -16,7 +16,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - depguard - dogsled - dupl @@ -25,27 +24,23 @@ linters: - gocritic - gofmt - goimports - - golint + - revive - goprintffuncname - gosec - gosimple - govet - ineffassign - - interfacer - misspell - nolintlint - rowserrcheck - - scopelint - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unparam - unused - - varcheck - whitespace - - maligned + - exportloopref service: golangci-lint-version: 1.33.x From fdafddc4ada8c95bd6ff835a8fa6c0cf29c38a57 Mon Sep 17 00:00:00 2001 From: GabrielePuliti <12409541+Wabri@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:55:10 +0200 Subject: [PATCH 3/4] fix(golangci): remove depguard because we don't need it --- .golangci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yaml b/.golangci.yaml index 9e59caf..3feca72 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -16,7 +16,6 @@ linters: disable-all: true enable: - bodyclose - - depguard - dogsled - dupl - errcheck From a5e55eced9a492856adabbd330d5c1774aba8e77 Mon Sep 17 00:00:00 2001 From: Wabri <12409541+Wabri@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:17:50 +0200 Subject: [PATCH 4/4] fix(pkg/cmd/init/init.go): try to skip unused-parameter --- pkg/cmd/init/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/init/init.go b/pkg/cmd/init/init.go index 519e2cd..6d7cff2 100644 --- a/pkg/cmd/init/init.go +++ b/pkg/cmd/init/init.go @@ -12,7 +12,7 @@ func NewCmdInit() *cobra.Command { cmd := &cobra.Command{ Use: "init [flags]", Short: "Initialize daje on your system", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, args []string) error { //nolint:all return submitAction() }, }