From 4f94b95172b75ccfe7bc87d79fe508292a5ea3af Mon Sep 17 00:00:00 2001 From: Jeroen Simonetti Date: Tue, 15 Apr 2025 10:21:45 +0200 Subject: [PATCH] chore: fix CI issues (#257) * chore: fix CI issues * chore: fix golangci-lint version issue --------- Signed-off-by: Jeroen Simonetti --- .github/workflows/go-test.yml | 6 ++-- .github/workflows/golangci-lint.yml | 2 +- .golangci.yml | 44 ++++++++++++++++++++--------- go.mod | 5 ++-- link_test.go | 2 +- 5 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index fa9d206..4311eab 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -5,7 +5,7 @@ jobs: name: Test MacOS strategy: matrix: - go-version: [1.22.x, 1.23.x] + go-version: [1.23.x, 1.24.x] platform: [macos-latest] runs-on: ${{ matrix.platform }} steps: @@ -33,7 +33,7 @@ jobs: name: Test Linux Integration strategy: matrix: - go-version: [1.22.x, 1.23.x] + go-version: [1.23.x, 1.24.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: @@ -61,7 +61,7 @@ jobs: name: Check for vulnerabilities strategy: matrix: - go-version: [1.22.x, 1.23.x] + go-version: [1.23.x, 1.24.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ad42bb4..786bc5b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -24,4 +24,4 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 with: - version: v1.54.2 + version: v2.0 diff --git a/.golangci.yml b/.golangci.yml index 295167c..796ffc5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,18 +1,34 @@ ---- +version: "2" linters: enable: - - gofmt - misspell - revive - -linters-settings: - misspell: - ignore-words: - # Incorrect spelling used in CacheInfo struct. - - Prefered - revive: - rules: - # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter - - name: unused-parameter - severity: warning - disabled: true + settings: + misspell: + ignore-rules: + - Prefered + revive: + rules: + - name: unused-parameter + severity: warning + disabled: true + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/go.mod b/go.mod index fb53e25..3ef5322 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,8 @@ module github.com/jsimonetti/rtnetlink/v2 -go 1.20 -toolchain go1.24.1 +go 1.23.0 + +toolchain go1.23.8 require ( github.com/cilium/ebpf v0.17.3 diff --git a/link_test.go b/link_test.go index 3951809..566c6e2 100644 --- a/link_test.go +++ b/link_test.go @@ -166,7 +166,7 @@ func TestLinkMessageUnmarshalBinary(t *testing.T) { var val_uint8_1 uint8 = 1 var val_uint32_1 uint32 = 1 - var val_string_3c string = "rtl" + var val_string_3c = "rtl" tests := []struct { name string