This is an automated email from the ASF dual-hosted git repository.
PragmaTwice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new caf24a60f chore(build): bump golangci-lint to 2.12.1 (#3476)
caf24a60f is described below
commit caf24a60f4a3a7330f34c1b7d8c07140ce872b23
Author: Aleks Lozovyuk <[email protected]>
AuthorDate: Wed May 6 18:04:59 2026 +0300
chore(build): bump golangci-lint to 2.12.1 (#3476)
Bump golangci-lint to 2.12.1 (changelog:
https://golangci-lint.run/docs/product/changelog/#v2121)
Bugfix and update a lot of linters
---
tests/gocase/unit/type/json/json_test.go | 8 ++++----
x.py | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/gocase/unit/type/json/json_test.go
b/tests/gocase/unit/type/json/json_test.go
index 9dddaa539..c6b6a2de7 100644
--- a/tests/gocase/unit/type/json/json_test.go
+++ b/tests/gocase/unit/type/json/json_test.go
@@ -723,13 +723,13 @@ func testJSON(t *testing.T, configs
util.KvrocksServerConfigs) {
//object
require.Equal(t, []interface{}{resultobject1}, rdb.Do(ctx,
"JSON.RESP", "item:2", "$.connection").Val())
//string
- var stringvalue = make([]interface{}, 0)
+ var stringvalue = make([]interface{}, 0, 1)
require.Equal(t, append(stringvalue, "Wireless Bluetooth in-ear
headphones"), rdb.Do(ctx, "JSON.RESP", "item:2", "$.description").Val())
//bool
- var boolvalue = make([]interface{}, 0)
+ var boolvalue = make([]interface{}, 0, 1)
require.Equal(t, append(boolvalue, "true"), rdb.Do(ctx,
"JSON.RESP", "item:2", "$.connection.wireless").Val())
//int
- var intvalue = make([]interface{}, 0)
+ var intvalue = make([]interface{}, 0, 1)
require.Equal(t, append(intvalue, int64(17)), rdb.Do(ctx,
"JSON.RESP", "item:2", "$.stock").Val())
require.NoError(t, rdb.Do(ctx, "JSON.SET", "item:3", "$", `{
"c1": [ { "a2": 1, "b2": "John Doe", "c2": 30, "d2": [ "Developer", "Team Lead"
] }, { "a2": 2, "b2": "Jane Smith", "c2": 25, "d2": [ "Developer" ] } ]
}`).Err())
require.Equal(t, []interface{}{int64(1), int64(2)}, rdb.Do(ctx,
"JSON.RESP", "item:3", "$..a2").Val())
@@ -739,7 +739,7 @@ func testJSON(t *testing.T, configs
util.KvrocksServerConfigs) {
require.ErrorIs(t, rdb.Do(ctx, "JSON.RESP", "no_exists").Err(),
redis.Nil)
//have key no find
- require.Equal(t, make([]interface{}, 0), rdb.Do(ctx,
"JSON.RESP", "item:2", "$.a").Val())
+ require.Equal(t, make([]interface{}, 0, 1), rdb.Do(ctx,
"JSON.RESP", "item:2", "$.a").Val())
})
}
diff --git a/x.py b/x.py
index d5e9dfa9b..40d499f14 100755
--- a/x.py
+++ b/x.py
@@ -32,7 +32,7 @@ from tempfile import TemporaryDirectory
CMAKE_REQUIRE_VERSION = (3, 16, 0)
CLANG_FORMAT_REQUIRED_VERSION = (18, 0, 0)
CLANG_TIDY_REQUIRED_VERSION = (18, 0, 0)
-GOLANGCI_LINT_REQUIRED_VERSION = (2, 9, 0)
+GOLANGCI_LINT_REQUIRED_VERSION = (2, 12, 1)
SEMVER_REGEX = re.compile(
r"""
@@ -253,7 +253,7 @@ def golangci_lint(golangci_lint_path: str) -> None:
return golangci_command, version_str
def download_package(bindir: str) -> None:
- output = run_pipe('curl', '-sfL',
'https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh',
+ output = run_pipe('curl', '-sfL',
'https://golangci-lint.run/install.sh',
verbose=True)
version_str = 'v' + '.'.join(map(str, GOLANGCI_LINT_REQUIRED_VERSION))
run('sh', '-s', '--', '-b', bindir, version_str, verbose=True,
stdin=output)