Gaea 2.4.2 Synchronization #8
reviewdog.yml
on: pull_request
runner / golangci-lint
21s
runner / staticcheck
1m 0s
Annotations
11 errors and 2 warnings
runner / golangci-lint
reviewdog exited with status code: 1
|
runner / staticcheck:
log/xlog/logger.go#L416
[staticcheck] reported by reviewdog 🐶
redundant return statement
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"redundant return statement","code":{"value":"S1023","url":"https://staticcheck.io/docs/checks#S1023"},"location":{"path":"/home/runner/work/Gaea/Gaea/log/xlog/logger.go","range":{"start":{"line":416,"column":2},"end":{"line":416,"column":8}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
models/shard_rule.go#L198
[staticcheck] reported by reviewdog 🐶
should replace loop with subTableIndexs = append(subTableIndexs, dayNumbers...)
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should replace loop with subTableIndexs = append(subTableIndexs, dayNumbers...)","code":{"value":"S1011","url":"https://staticcheck.io/docs/checks#S1011"},"location":{"path":"/home/runner/work/Gaea/Gaea/models/shard_rule.go","range":{"start":{"line":198,"column":3},"end":{"line":198,"column":31}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
models/shard_rule.go#L218
[staticcheck] reported by reviewdog 🐶
should replace loop with subTableIndexs = append(subTableIndexs, monthNumbers...)
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should replace loop with subTableIndexs = append(subTableIndexs, monthNumbers...)","code":{"value":"S1011","url":"https://staticcheck.io/docs/checks#S1011"},"location":{"path":"/home/runner/work/Gaea/Gaea/models/shard_rule.go","range":{"start":{"line":218,"column":3},"end":{"line":218,"column":33}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
models/shard_rule.go#L238
[staticcheck] reported by reviewdog 🐶
should replace loop with subTableIndexs = append(subTableIndexs, yearNumbers...)
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should replace loop with subTableIndexs = append(subTableIndexs, yearNumbers...)","code":{"value":"S1011","url":"https://staticcheck.io/docs/checks#S1011"},"location":{"path":"/home/runner/work/Gaea/Gaea/models/shard_rule.go","range":{"start":{"line":238,"column":3},"end":{"line":238,"column":32}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
mysql/charset_tidb.go#L98
[staticcheck] reported by reviewdog 🐶
should use 'return ok' instead of 'if !ok { return false }; return true'
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should use 'return ok' instead of 'if !ok { return false }; return true'","code":{"value":"S1008","url":"https://staticcheck.io/docs/checks#S1008"},"location":{"path":"/home/runner/work/Gaea/Gaea/mysql/charset_tidb.go","range":{"start":{"line":98,"column":2},"end":{"line":100,"column":3}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
mysql/resultset_sort_test.go#L63
[staticcheck] reported by reviewdog 🐶
should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...))
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...))","code":{"value":"S1038","url":"https://staticcheck.io/docs/checks#S1038"},"location":{"path":"/home/runner/work/Gaea/Gaea/mysql/resultset_sort_test.go","range":{"start":{"line":63,"column":3},"end":{"line":63,"column":40}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
mysql/resultset_sort_test.go#L86
[staticcheck] reported by reviewdog 🐶
should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...))
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...))","code":{"value":"S1038","url":"https://staticcheck.io/docs/checks#S1038"},"location":{"path":"/home/runner/work/Gaea/Gaea/mysql/resultset_sort_test.go","range":{"start":{"line":86,"column":3},"end":{"line":86,"column":40}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
mysql/resultset_sort_test.go#L109
[staticcheck] reported by reviewdog 🐶
should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...))
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...))","code":{"value":"S1038","url":"https://staticcheck.io/docs/checks#S1038"},"location":{"path":"/home/runner/work/Gaea/Gaea/mysql/resultset_sort_test.go","range":{"start":{"line":109,"column":3},"end":{"line":109,"column":40}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck:
mysql/util_test.go#L57
[staticcheck] reported by reviewdog 🐶
don't use Yoda conditions
Raw Output:
{"source":{"name":"staticcheck","url":"https://staticcheck.io"},"message":"don't use Yoda conditions","code":{"value":"ST1017","url":"https://staticcheck.io/docs/checks#ST1017"},"location":{"path":"/home/runner/work/Gaea/Gaea/mysql/util_test.go","range":{"start":{"line":57,"column":93},"end":{"line":57,"column":146}}},"related_locations":[],"severity":"ERROR"}
|
runner / staticcheck
reviewdog: Too many results (annotations) in diff.
You may miss some annotations due to GitHub limitation for annotation created by logging command.
Please check GitHub Actions log console to see all results.
Limitation:
- 10 warning annotations and 10 error annotations per step
- 50 annotations per job (sum of annotations from all the steps)
- 50 annotations per run (separate from the job annotations, these annotations aren't created by users)
Source: https://github.com/orgs/community/discussions/26680#discussioncomment-3252835
|
runner / golangci-lint
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
runner / staticcheck
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-go@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|