You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2026/10/14 06:55:35 UTC

(devlake) branch main updated: build(backend): bump golangci-lint to v2.14.0 (#9210)

This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 9faa22085 build(backend): bump golangci-lint to v2.14.0 (#9210)
9faa22085 is described below

commit 9faa2208588bbf6a053f1dfd98a93c5edfccccb0
Author: Dirk <Do...@proton.me>
AuthorDate: Wed Oct 14 08:55:28 2026 +0200

    build(backend): bump golangci-lint to v2.14.0 (#9210)
    
    - 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 <Do...@proton.me>
---
 .github/workflows/golangci-lint.yml                     |  2 +-
 backend/.golangci.yaml                                  | 10 +++++++++-
 backend/Makefile                                        |  2 +-
 backend/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 3fe8242e3..546c40bde 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 70902b908..e681671d2 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 b9dbe42e0..98a81a858 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 56f56f186..91174f763 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 44987162f..15a36d9f8 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<namespace>[^/]+)/(?P<repo_name>[^/]+)/commits/(?P<commit_sha>\w{40})`},
-					{"", `https://gitlab.com/(?P<namespace>\S+)/(?P<repo_name>\S+)/-/commit/(?P<commit_sha>\w{40})`},
-					{"", `https://github.com/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commit/(?P<commit_sha>\w{40})`},
+					{Pattern: "", Regex: `https://bitbucket.org/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commits/(?P<commit_sha>\w{40})`},
+					{Pattern: "", Regex: `https://gitlab.com/(?P<namespace>\S+)/(?P<repo_name>\S+)/-/commit/(?P<commit_sha>\w{40})`},
+					{Pattern: "", Regex: `https://github.com/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commit/(?P<commit_sha>\w{40})`},
 				},
 			},
 		},