From 973b197d0e8592eddcb607557b49e97fd1d34737 Mon Sep 17 00:00:00 2001 From: Sid Shukla Date: Thu, 15 Aug 2024 16:49:35 +0200 Subject: [PATCH] build(lint): Update golangci-lint-action version to v6 (#474) * build(lint): Update golangci-lint version to v6 Use v6 of the golang-ci-lint action * build(lint): Update golangci-lint version to v1.59.1 --- .github/workflows/build-dev.yaml | 4 ++- devbox.json | 2 +- devbox.lock | 48 ++++++++++++++++++++++++++++++++ hack/flakes/flake.nix | 2 -- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-dev.yaml b/.github/workflows/build-dev.yaml index 56a6eed9c4..d5e2d179a9 100644 --- a/.github/workflows/build-dev.yaml +++ b/.github/workflows/build-dev.yaml @@ -39,7 +39,9 @@ jobs: run: devbox run -- make generate fmt vet build - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3.7.0 + uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 - name: Lint run: devbox run -- make lint-yaml diff --git a/devbox.json b/devbox.json index 5125f35a9c..a9585298dc 100644 --- a/devbox.json +++ b/devbox.json @@ -8,6 +8,7 @@ "gnumake@4.4.1", "ginkgo@2.19.0", "go@1.22.1", + "golangci-lint@1.59.1", "gotestsum@1.6.4", "kubernetes-helm@latest", "kind@0.23.0", @@ -23,7 +24,6 @@ "path:./hack/flakes#go-junit-report", "path:./hack/flakes#gocov", "path:./hack/flakes#gocov-xml", - "path:./hack/flakes#golangci-lint", "path:./hack/flakes#yamllint-checkstyle", "path:./hack/flakes#setup-envtest" ] diff --git a/devbox.lock b/devbox.lock index 9e49223384..ef24927764 100644 --- a/devbox.lock +++ b/devbox.lock @@ -269,6 +269,54 @@ } } }, + "golangci-lint@1.59.1": { + "last_modified": "2024-07-20T09:11:00Z", + "resolved": "github:NixOS/nixpkgs/6e14bbce7bea6c4efd7adfa88a40dac750d80100#golangci-lint", + "source": "devbox-search", + "version": "1.59.1", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/80cn62vqs99adkpvjv5qmv9nvkahcy0s-golangci-lint-1.59.1", + "default": true + } + ], + "store_path": "/nix/store/80cn62vqs99adkpvjv5qmv9nvkahcy0s-golangci-lint-1.59.1" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/f91hm1xlmjy5y18lavfn9889azxam4mp-golangci-lint-1.59.1", + "default": true + } + ], + "store_path": "/nix/store/f91hm1xlmjy5y18lavfn9889azxam4mp-golangci-lint-1.59.1" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/pn0lpm53xffqvdfd72n4mfn8ja4kmf1h-golangci-lint-1.59.1", + "default": true + } + ], + "store_path": "/nix/store/pn0lpm53xffqvdfd72n4mfn8ja4kmf1h-golangci-lint-1.59.1" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/fx4p42sdx70hzpzsl71r5zwh8az0p74a-golangci-lint-1.59.1", + "default": true + } + ], + "store_path": "/nix/store/fx4p42sdx70hzpzsl71r5zwh8az0p74a-golangci-lint-1.59.1" + } + } + }, "gotestsum@1.6.4": { "last_modified": "2021-07-26T10:49:44Z", "resolved": "github:NixOS/nixpkgs/2030abed5863fc11eccac0735f27a0828376c84e#gotestsum", diff --git a/hack/flakes/flake.nix b/hack/flakes/flake.nix index 79d36032fb..1c6e8e4e79 100644 --- a/hack/flakes/flake.nix +++ b/hack/flakes/flake.nix @@ -10,8 +10,6 @@ flake-utils.lib.eachDefaultSystem (system: with nixpkgs.legacyPackages.${system}; rec { packages = rec { - golangci-lint = pkgs.golangci-lint.override { buildGoModule = buildGo121Module; }; - go-apidiff = buildGo121Module { name = "go-apidiff"; src = fetchFromGitHub {