From e9eeee6953123c2afdddf0a024c19e2c69fb5bea Mon Sep 17 00:00:00 2001 From: DoDiODev Date: Mon, 12 Oct 2026 14:41:59 +0200 Subject: [PATCH] build(backend): bump golangci-lint to v2.14.0 - golangci-lint v2.12.2 -> v2.14.0 in backend/Makefile and the golangci-lint workflow - staticcheck v0.8.1 reports the aws-sdk-go v1 SA1019 message without quotes; let the kiro exclusion match both forms - staticcheck v0.8.1 newly reports 201 uses of the deprecated RawDataSubTaskArgs.Params across ~40 plugins. Exclude that single message centrally: switching to Options changes the stored _raw_data_params and needs a per-plugin data migration - fix two go vet findings in tests (unused fmt.Sprintf result, unkeyed CommitUrlPattern literals) Signed-off-by: DoDiODev --- .github/workflows/golangci-lint.yml | 2 +- backend/.golangci.yaml | 10 +++++++++- backend/Makefile | 2 +- .../plugins/github/tasks/cicd_job_convertor_test.go | 2 +- backend/plugins/jira/e2e/issue_repo_commit_test.go | 6 +++--- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 3fe8242e340..546c40bdeb3 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -52,5 +52,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.12.2 + version: v2.14.0 working-directory: ./backend diff --git a/backend/.golangci.yaml b/backend/.golangci.yaml index 70902b9081f..e681671d212 100644 --- a/backend/.golangci.yaml +++ b/backend/.golangci.yaml @@ -245,7 +245,15 @@ linters: - linters: - staticcheck path: plugins/kiro/ - text: 'SA1019: "github.com/aws/aws-sdk-go/' + text: 'SA1019: "?github.com/aws/aws-sdk-go/' + # RawDataSubTaskArgs.Params is deprecated in favour of Options, but it is + # JSON-encoded into _raw_data_params of every raw table. Migrating a + # plugin changes that key and orphans existing raw data, so this needs a + # per-plugin migration rather than a mechanical rewrite. Reported since + # golangci-lint v2.14.0 (staticcheck v0.8.1). + - linters: + - staticcheck + text: 'SA1019: .*RawDataSubTaskArgs\)\.Params is deprecated' paths: - third_party$ - builtin$ diff --git a/backend/Makefile b/backend/Makefile index b9dbe42e011..98a81a858e1 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -37,7 +37,7 @@ all: build go-dep: go install github.com/vektra/mockery/v3@$(MOCKERY_VERSION) go install github.com/swaggo/swag/cmd/swag@v1.16.6 - go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.14.0 go-dev-tools: # go install github.com/atombender/go-jsonschema/cmd/gojsonschema@latest diff --git a/backend/plugins/github/tasks/cicd_job_convertor_test.go b/backend/plugins/github/tasks/cicd_job_convertor_test.go index 56f56f186b0..91174f76351 100644 --- a/backend/plugins/github/tasks/cicd_job_convertor_test.go +++ b/backend/plugins/github/tasks/cicd_job_convertor_test.go @@ -41,7 +41,7 @@ func GenJobID() { connectionId := uint64(1) runId := 1 lineId := 1 - fmt.Sprintf("GithubJob:%d:%d:%d", connectionId, runId, lineId) + _ = fmt.Sprintf("GithubJob:%d:%d:%d", connectionId, runId, lineId) } func BenchmarkGenJobIDWithReflect(b *testing.B) { diff --git a/backend/plugins/jira/e2e/issue_repo_commit_test.go b/backend/plugins/jira/e2e/issue_repo_commit_test.go index 44987162f79..15a36d9f879 100644 --- a/backend/plugins/jira/e2e/issue_repo_commit_test.go +++ b/backend/plugins/jira/e2e/issue_repo_commit_test.go @@ -38,9 +38,9 @@ func TestConvertIssueRepoCommitsDataFlow(t *testing.T) { ScopeConfig: &models.JiraScopeConfig{ RemotelinkCommitShaPattern: `.*/commit/(.*)`, RemotelinkRepoPattern: []models.CommitUrlPattern{ - {"", `https://bitbucket.org/(?P[^/]+)/(?P[^/]+)/commits/(?P\w{40})`}, - {"", `https://gitlab.com/(?P\S+)/(?P\S+)/-/commit/(?P\w{40})`}, - {"", `https://github.com/(?P[^/]+)/(?P[^/]+)/commit/(?P\w{40})`}, + {Pattern: "", Regex: `https://bitbucket.org/(?P[^/]+)/(?P[^/]+)/commits/(?P\w{40})`}, + {Pattern: "", Regex: `https://gitlab.com/(?P\S+)/(?P\S+)/-/commit/(?P\w{40})`}, + {Pattern: "", Regex: `https://github.com/(?P[^/]+)/(?P[^/]+)/commit/(?P\w{40})`}, }, }, },