Skip to content

Commit 9faa220

Browse files
authored
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 <DoDiDev@proton.me>
1 parent 7395ce4 commit 9faa220

5 files changed

Lines changed: 15 additions & 7 deletions

File tree

‎.github/workflows/golangci-lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ jobs:
5252
- name: golangci-lint
5353
uses: golangci/golangci-lint-action@v9
5454
with:
55-
version: v2.12.2
55+
version: v2.14.0
5656
working-directory: ./backend

‎backend/.golangci.yaml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,15 @@ linters:
245245
- linters:
246246
- staticcheck
247247
path: plugins/kiro/
248-
text: 'SA1019: "github.com/aws/aws-sdk-go/'
248+
text: 'SA1019: "?github.com/aws/aws-sdk-go/'
249+
# RawDataSubTaskArgs.Params is deprecated in favour of Options, but it is
250+
# JSON-encoded into _raw_data_params of every raw table. Migrating a
251+
# plugin changes that key and orphans existing raw data, so this needs a
252+
# per-plugin migration rather than a mechanical rewrite. Reported since
253+
# golangci-lint v2.14.0 (staticcheck v0.8.1).
254+
- linters:
255+
- staticcheck
256+
text: 'SA1019: .*RawDataSubTaskArgs\)\.Params is deprecated'
249257
paths:
250258
- third_party$
251259
- builtin$

‎backend/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ all: build
3737
go-dep:
3838
go install github.com/vektra/mockery/v3@$(MOCKERY_VERSION)
3939
go install github.com/swaggo/swag/cmd/swag@v1.16.6
40-
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2
40+
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.14.0
4141

4242
go-dev-tools:
4343
# go install github.com/atombender/go-jsonschema/cmd/gojsonschema@latest

‎backend/plugins/github/tasks/cicd_job_convertor_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func GenJobID() {
4141
connectionId := uint64(1)
4242
runId := 1
4343
lineId := 1
44-
fmt.Sprintf("GithubJob:%d:%d:%d", connectionId, runId, lineId)
44+
_ = fmt.Sprintf("GithubJob:%d:%d:%d", connectionId, runId, lineId)
4545
}
4646

4747
func BenchmarkGenJobIDWithReflect(b *testing.B) {

‎backend/plugins/jira/e2e/issue_repo_commit_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ func TestConvertIssueRepoCommitsDataFlow(t *testing.T) {
3838
ScopeConfig: &models.JiraScopeConfig{
3939
RemotelinkCommitShaPattern: `.*/commit/(.*)`,
4040
RemotelinkRepoPattern: []models.CommitUrlPattern{
41-
{"", `https://bitbucket.org/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commits/(?P<commit_sha>\w{40})`},
42-
{"", `https://gitlab.com/(?P<namespace>\S+)/(?P<repo_name>\S+)/-/commit/(?P<commit_sha>\w{40})`},
43-
{"", `https://github.com/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commit/(?P<commit_sha>\w{40})`},
41+
{Pattern: "", Regex: `https://bitbucket.org/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commits/(?P<commit_sha>\w{40})`},
42+
{Pattern: "", Regex: `https://gitlab.com/(?P<namespace>\S+)/(?P<repo_name>\S+)/-/commit/(?P<commit_sha>\w{40})`},
43+
{Pattern: "", Regex: `https://github.com/(?P<namespace>[^/]+)/(?P<repo_name>[^/]+)/commit/(?P<commit_sha>\w{40})`},
4444
},
4545
},
4646
},

0 commit comments

Comments
 (0)