Repository navigation
CI: upgrade mo dep golang version fix sca error - #18273
Merged
Merged
Conversation
guguducken
marked this pull request as draft
August 21, 2024 15:00
Contributor
Author
Contributor
Author
|
SCA CI失败应该是因为环境中的go版本还没有升级到1.23.0,还维持在1.22.3版本。从而导致molint对其也进行了检查。这个在本地测试通过 等PR matrixorigin/CI#102 合并之后,环境中Go版本就会升级到1.23.0,预期此问题就会解决 |
guguducken
marked this pull request as ready for review
August 23, 2024 09:43
guguducken
requested review from
XuPeng-SH,
fengttt,
jiangxinmeng1,
reusee,
triump2020 and
volgariver6
as code owners
August 23, 2024 09:43
Contributor
Author
daviszhen
approved these changes
Aug 23, 2024
reusee
approved these changes
Aug 23, 2024
zhangxu19830126
approved these changes
Aug 23, 2024
badboynt1
approved these changes
Aug 23, 2024
triump2020
approved these changes
Aug 23, 2024
xzxiong
approved these changes
Aug 23, 2024
m-schen
approved these changes
Aug 23, 2024
jiangxinmeng1
approved these changes
Aug 23, 2024
aptend
approved these changes
Aug 23, 2024
qingxinhome
approved these changes
Aug 23, 2024
fengttt
approved these changes
Aug 23, 2024
fengttt
approved these changes
Aug 24, 2024
aressu1985
approved these changes
Aug 24, 2024
XuPeng-SH
approved these changes
Aug 24, 2024
w-zr
approved these changes
Aug 24, 2024
ouyuanning
approved these changes
Aug 24, 2024
volgariver6
approved these changes
Aug 24, 2024
LeftHandCold
approved these changes
Aug 24, 2024
sukki37
approved these changes
Aug 24, 2024
iamlinjunhong
approved these changes
Aug 24, 2024
aunjgr
approved these changes
Aug 24, 2024
fengttt
pushed a commit
to fengttt/matrixone
that referenced
this pull request
May 7, 2026
1. 将go版本从1.22.3升级到1.23.0 2. 升级golangci-lint版本以支持go 1.23.0,并更新其配置文件 3. 修复sca中printf相关问题。 3.1. 修复某些错误的调用,例如:`logutil.Infof` --> `logutil.Info` 3.2. 防止在生成error是错误的将message作为`fmt.Sprintf`函数的format,从而导致生成不可预期的字符串,具体如下 - 将moerr包中`NewXxxx(ctx context.Context, msg string, args ...any)`的相关函数修改为`NewXxxxf(ctx context.Context, msg string, args ...any)`以及`NewXxxx(ctx context.Context, msg string)` - 将moerr包中`NewXxxxNoCtx(msg string, args ...any)`的相关函数修改为`NewXxxxNoCtxf(msg string, args ...any)`以及`NewXxxxNoCtx(msg string)` 5. go在1.22之后修复了forrange中loopvar的问题,现已不需要在循环中覆盖,故删除相关的代码matrixorigin@8bc380f 6. 删除了某些重复的判断matrixorigin@8bc380f 7. 修复了nilness相关的问题,具体可参考ref 8. 修复了部分shadow的问题,但是有一些无法确定,故没有修改,且在sca中暂时disable 9. 修复了一些因为错误使用`fmt.Sprintf`导致的错误的bvt result matrixorigin@a8ad671 matrixorigin@76c748b 10. 目前govet中disable的检查项有`fieldalignment`,`shadow`,`unusedwrite` Ref: 1. https://go.dev/blog/loopvar-preview 2. https://staticcheck.dev/docs/checks#S1009 3. https://staticcheck.dev/docs/checks#S1008 5. https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/nilness Approved by: @daviszhen, @reusee, @zhangxu19830126, @badboynt1, @triump2020, @xzxiong, @m-schen, @jiangxinmeng1, @aptend, @qingxinhome, @fengttt, @aressu1985, @XuPeng-SH, @w-zr, @ouyuanning, @volgariver6, @LeftHandCold, @sukki37, @iamlinjunhong, @aunjgr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What type of PR is this?
Which issue(s) this PR fixes:
issue # https://github.com/matrixorigin/MO-Cloud/issues/3922
What this PR does / why we need it:
3.1. 修复某些错误的调用,例如:
logutil.Infof-->logutil.Info3.2. 防止在生成error是错误的将message作为
fmt.Sprintf函数的format,从而导致生成不可预期的字符串,具体如下NewXxxx(ctx context.Context, msg string, args ...any)的相关函数修改为NewXxxxf(ctx context.Context, msg string, args ...any)以及NewXxxx(ctx context.Context, msg string)NewXxxxNoCtx(msg string, args ...any)的相关函数修改为NewXxxxNoCtxf(msg string, args ...any)以及NewXxxxNoCtx(msg string)fmt.Sprintf导致的错误的bvt result a8ad671 76c748bfieldalignment,shadow,unusedwriteRef: