From dbc697a479eec88f514972b40271cf299fe4de96 Mon Sep 17 00:00:00 2001
From: Itxaka <itxaka.garcia@spectrocloud.com>
Date: Tue, 25 Mar 2025 11:48:39 +0100
Subject: [PATCH] Bump golangci lint config (#453)

Signed-off-by: Itxaka <itxaka@kairos.io>
---
 .github/workflows/lint.yaml |  2 +-
 .golangci.yml               | 47 +++++++++++++++++++++++--------------
 2 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml
index cd72301..f5fc6f5 100644
--- a/.github/workflows/lint.yaml
+++ b/.github/workflows/lint.yaml
@@ -25,7 +25,7 @@ jobs:
         with:
           go-version-file: go.mod
       - name: Golangci-lint
-        uses: golangci/golangci-lint-action@v6.5.2
+        uses: golangci/golangci-lint-action@v7.0.0
         with:
           version: latest
           only-new-issues: true
diff --git a/.golangci.yml b/.golangci.yml
index 7627f5d..dbad179 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,23 +1,36 @@
+version: "2"
 run:
-  timeout: 5m
   tests: false
 linters:
   enable:
-    - revive # replacement for golint
-    - dupl # check duplicated code
-    - goconst # check strings that can turn into constants
-    - gofmt # check fmt
-    - goheader # Check license headers, only checks files in current year
-    - goimports # check imports
-    - gocyclo # check complexity
-    - govet
-    - gosimple
-    - ineffassign
-    - unused
-    - staticcheck
-    - typecheck
-    - godot
-    - misspell
-    - zerologlint
+    - dupl
     - ginkgolinter
     - gocheckcompilerdirectives
+    - goconst
+    - gocyclo
+    - godot
+    - goheader
+    - misspell
+    - revive
+    - zerologlint
+  exclusions:
+    generated: lax
+    presets:
+      - comments
+      - common-false-positives
+      - legacy
+      - std-error-handling
+    paths:
+      - third_party$
+      - builtin$
+      - examples$
+formatters:
+  enable:
+    - gofmt
+    - goimports
+  exclusions:
+    generated: lax
+    paths:
+      - third_party$
+      - builtin$
+      - examples$