rtk-ai/rtk

feat(go): Support golangci-lint called via go tool

Open

#744 创建于 2026年3月20日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clieffort-smallenhancementgood first issuehelp wantedpriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

As of go v1.24, tools such as golanci-lint can be managed via the mod file and called directly on the go binary via the tool subcommand.

As of v0.31.0 rtk does not handle this command, requiring golangci-lint to be installed on the users's $PATH.

$ go tool golangci-lint run main.go 
main.go:6:7: printf: fmt.Sprintf format %s has arg 9.0 of wrong type float64 (govet)
	i := fmt.Sprintf("hello %s", 9.0)
	    ^
$ rtk go tool golangci-lint run main.go
main.go:6:7: printf: fmt.Sprintf format %s has arg 9.0 of wrong type float64 (govet)
	i := fmt.Sprintf("hello %s", 9.0)
	    ^

贡献者指南