Open chuangjinglu opened 1 month ago
以下是 go-critic 产生的错误:
./main.go:274:28: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(
cliRunner.Subcommand(), "-", "_", -1)`
./main.go:274:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(strings.Replace(
cliRunner.Subcommand(), "-", "_", -1), " ", "_", -1)`
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
./named.go:409:1: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
./named.go:45:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./named_context.go:40:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./main.go:123:2: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
./gitlab.go:45:18: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(result.ReadmeURL, "blob", "raw", -1)`
./auth.go:74:10: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(line, " ", " ", -1)`
./gost.go:198:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(line, " ", " ", -1)`
./obfs.go:737:21: commentFormatting: put a space between `//` and comment text
./obfs.go:384:4: ifElseChain: rewrite if-else to switch statement
./permissions.go:207:3: assignOp: replace `addr = addr + ":80"` with `addr += ":80"`
./relay.go:79:4: ifElseChain: rewrite if-else to switch statement
./signal_unix.go:20:3: singleCaseSwitch: should rewrite switch statement to if statement
./socks.go:1309:3: commentFormatting: put a space between `//` and comment text
./tuntap.go:276:5: ifElseChain: rewrite if-else to switch statement
./tuntap.go:347:5: ifElseChain: rewrite if-else to switch statement
./named.go:409:1: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
./named.go:342:3: ifElseChain: rewrite if-else to switch statement
./named.go:45:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./named_context.go:40:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./sqlx_context_test.go:489:10: underef: could simplify (*db).Mapper to db.Mapper
./sqlx_context_test.go:510:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s, `"`, "`", -1)`
./sqlx_test.go:661:10: underef: could simplify (*db).Mapper to db.Mapper
./sqlx_test.go:682:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s, `"`, "`", -1)`
./sqlx_test.go:105:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s.create, `"`, "`", -1)`
./sqlx_test.go:109:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s.create, `now()`, `CURRENT_TIMESTAMP`, -1)`
./main.go:123:2: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
./main.go:467:4: exitAfterDefer: os.Exit will exit, and `defer cancel(nil)` will not run
./main.go:56:3: exitAfterDefer: os.Exit will exit, and `defer profile.Start(profile.MemProfile).Stop()` will not run
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
以下是 go-critic 产生的错误:
./gitlab.go:45:18: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(result.ReadmeURL, "blob", "raw", -1)`
./auth.go:74:10: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(line, " ", " ", -1)`
./gost.go:198:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(line, " ", " ", -1)`
./obfs.go:737:21: commentFormatting: put a space between `//` and comment text
./obfs.go:384:4: ifElseChain: rewrite if-else to switch statement
./permissions.go:207:3: assignOp: replace `addr = addr + ":80"` with `addr += ":80"`
./relay.go:79:4: ifElseChain: rewrite if-else to switch statement
./signal_unix.go:20:3: singleCaseSwitch: should rewrite switch statement to if statement
./socks.go:1309:3: commentFormatting: put a space between `//` and comment text
./tuntap.go:276:5: ifElseChain: rewrite if-else to switch statement
./tuntap.go:347:5: ifElseChain: rewrite if-else to switch statement
./named.go:409:1: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
./named.go:342:3: ifElseChain: rewrite if-else to switch statement
./named.go:45:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./named_context.go:40:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./sqlx_context_test.go:489:10: underef: could simplify (*db).Mapper to db.Mapper
./sqlx_context_test.go:510:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s, `"`, "`", -1)`
./sqlx_test.go:661:10: underef: could simplify (*db).Mapper to db.Mapper
./sqlx_test.go:682:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s, `"`, "`", -1)`
./sqlx_test.go:105:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s.create, `"`, "`", -1)`
./sqlx_test.go:109:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s.create, `now()`, `CURRENT_TIMESTAMP`, -1)`
./main.go:123:2: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
./main.go:467:4: exitAfterDefer: os.Exit will exit, and `defer cancel(nil)` will not run
./main.go:56:3: exitAfterDefer: os.Exit will exit, and `defer profile.Start(profile.MemProfile).Stop()` will not run
https://github.com/jmoiron/sqlx
以下是 go-critic 产生的错误:
./named.go:409:1: deprecatedComment: use `Deprecated: ` (note the casing) instead of `DEPRECATED: `
./named.go:342:3: ifElseChain: rewrite if-else to switch statement
./named.go:45:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./named_context.go:40:10: newDeref: replace `*new(sql.Result)` with `sql.Result(nil)`
./sqlx_context_test.go:489:10: underef: could simplify (*db).Mapper to db.Mapper
./sqlx_context_test.go:510:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s, `"`, "`", -1)`
./sqlx_test.go:661:10: underef: could simplify (*db).Mapper to db.Mapper
./sqlx_test.go:682:12: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s, `"`, "`", -1)`
./sqlx_test.go:105:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s.create, `"`, "`", -1)`
./sqlx_test.go:109:9: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(s.create, `now()`, `CURRENT_TIMESTAMP`, -1)`
https://github.com/syncthing/syncthing
以下是 go-critic 产生的错误:
https://github.com/avelino/awesome-go
以下是 go-critic 产生的错误:
./stale_repositories_test.go:36:82: commentFormatting: put a space between `//` and comment text
https://github.com/gin-gonic/gin
以下是 go-critic 产生的错误:
./recovery.go:83:6: ifElseChain: rewrite if-else to switch statement
./tree.go:239:15: offBy1: Index() can return -1; maybe you wanted to do Index()+1
./benchmarks_test.go:14:24: captLocal: `B' should not be capitalized
./benchmarks_test.go:20:34: captLocal: `B' should not be capitalized
./benchmarks_test.go:27:32: captLocal: `B' should not be capitalized
./benchmarks_test.go:34:28: captLocal: `B' should not be capitalized
./benchmarks_test.go:43:23: captLocal: `B' should not be capitalized
./benchmarks_test.go:51:28: captLocal: `B' should not be capitalized
./benchmarks_test.go:62:28: captLocal: `B' should not be capitalized
./benchmarks_test.go:74:27: captLocal: `B' should not be capitalized
./benchmarks_test.go:82:30: captLocal: `B' should not be capitalized
./benchmarks_test.go:90:30: captLocal: `B' should not be capitalized
./benchmarks_test.go:96:30: captLocal: `B' should not be capitalized
./benchmarks_test.go:102:19: captLocal: `B' should not be capitalized
./benchmarks_test.go:109:23: captLocal: `B' should not be capitalized
./benchmarks_test.go:148:17: captLocal: `B' should not be capitalized
./context_test.go:1195:65: wrapperFunc: use strings.ReplaceAll method in `strings.Replace("event:float
data:1.5
id:12<...>ar\":\"foo\",\"foo\":\"bar\"}
", " ", "", -1)`
./context_test.go:1195:18: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(w.Body.String(), " ", "", -1)`
./gin_test.go:557:3: singleCaseSwitch: should rewrite switch statement to if statement
./gin_test.go:739:16: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(param, "-", "/", -1)`
./githubapi_test.go:31:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:54:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:77:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:81:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:93:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:96:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:110:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:114:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:117:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:120:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:125:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:136:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:152:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:163:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:179:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:185:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:188:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:199:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:215:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:220:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:227:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:237:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:244:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:268:2: commentFormatting: put a space between `//` and comment text
./githubapi_test.go:285:2: commentFormatting: put a space between `//` and comment text
./middleware_test.go:252:18: wrapperFunc: use strings.ReplaceAll method in `strings.Replace("hola
<map><foo>bar</foo></map<...>ar\"}event:test
data:message
", " ", "", -1)`
./middleware_test.go:252:145: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(w.Body.String(), " ", "", -1)`
./tree_test.go:484:2: commentFormatting: put a space between `//` and comment text
./tree_test.go:50:3: ifElseChain: rewrite if-else to switch statement
https://github.com/prometheus/prometheus
以下是 go-critic 产生的错误:
https://github.com/caddyserver/caddy
以下是 go-critic 产生的错误:
./context.go:201:3: ifElseChain: rewrite if-else to switch statement
./listeners.go:660:40: argOrder: "ip4:" and network arguments order looks reversed
./listeners.go:660:78: argOrder: "ip6:" and network arguments order looks reversed
./listeners.go:660:3: argOrder: "ip:" and network arguments order looks reversed
./listeners.go:160:2: ifElseChain: rewrite if-else to switch statement
https://github.com/jesseduffield/lazygit
以下是 go-critic 产生的错误:
https://github.com/ollama/ollama
以下是 go-critic 产生的错误:
https://github.com/FiloSottile/mkcert
以下是 go-critic 产生的错误:
./cert.go:178:16: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(defaultName, "*", "_wildcard", -1)`
./cert.go:177:17: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(hosts[0], ":", "_", -1)`
./main.go:179:2: ifElseChain: rewrite if-else to switch statement
./main.go:282:4: ifElseChain: rewrite if-else to switch statement
./truststore_java.go:74:18: wrapperFunc: use bytes.ReplaceAll method in `bytes.Replace(keytoolOutput, []byte(":"), nil, -1)`
./truststore_linux.go:36:2: ifElseChain: rewrite if-else to switch statement
./truststore_linux.go:52:42: wrapperFunc: use strings.ReplaceAll method in `strings.Replace(m.caUniqueName(), " ", "_", -1)`
https://github.com/traefik/traefik
以下是 go-critic 产生的错误:
https://github.com/v2ray/v2ray-core
以下是 go-critic 产生的错误:
https://github.com/kubernetes/kubernetes
以下是 go-critic 产生的错误:
https://github.com/astaxie/build-web-application-with-golang
以下是 go-critic 产生的错误:
https://github.com/gohugoio/hugo
以下是 go-critic 产生的错误:
./main_test.go:90:8: wrapperFunc: use bytes.ReplaceAll method in `bytes.Replace(b, []byte("
"), []byte{'
'}, -1)`
./main_test.go:179:18: wrapperFunc: use bytes.ReplaceAll method in `bytes.Replace(oldContent, []byte(args[1]), []byte(args[2]), -1)`
https://github.com/evanw/esbuild
以下是 go-critic 产生的错误:
https://github.com/coreybutler/nvm-windows
以下是 go-critic 产生的错误:
https://github.com/ethereum/go-ethereum
以下是 go-critic 产生的错误:
https://github.com/rclone/rclone
以下是 go-critic 产生的错误:
https://github.com/go-gorm/gorm
以下是 go-critic 产生的错误:
./association.go:421:5: ifElseChain: rewrite if-else to switch statement
./chainable_api.go:136:3: ifElseChain: rewrite if-else to switch statement
./finisher_api.go:274:5: singleCaseSwitch: should rewrite switch statement to if statement
./scan.go:15:2: ifElseChain: rewrite if-else to switch statement
./statement.go:118:4: ifElseChain: rewrite if-else to switch statement
./statement.go:241:5: ifElseChain: rewrite if-else to switch statement
https://github.com/jesseduffield/lazydocker
以下是 go-critic 产生的错误:
https://github.com/unknwon/the-way-to-go_ZH_CN
以下是 go-critic 产生的错误:
https://github.com/docker/compose
以下是 go-critic 产生的错误:
https://github.com/photoprism/photoprism
以下是 go-critic 产生的错误:
https://github.com/pocketbase/pocketbase
以下是 go-critic 产生的错误:
https://github.com/halfrost/LeetCode-Go
以下是 go-critic 产生的错误:
Go-Critic 静态分析报告
以下是 go-critic 产生的错误:
alist 错误:
gitea 错误:
gogs 错误:
terraform 错误: