kubernetes-sigs/cluster-api

Enable usetesting in golangci.yml

开放

#12,179 创建于 2025年5月9日

 (5 条评论) (1 个反应) (1 位负责人)Go (1,532 个派生)auto 404
help wantedkind/cleanuppriority/backlogtriage/accepted

仓库指标

星标
 (4,267 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

usetesting linter is automatically enabled when Go 1.24 is used.

This linter diagnose the calls that can be replaced by functions defined in testing package. e.g. os.Setenv -> testing.Setenv.

It is what we're going to do after https://github.com/kubernetes-sigs/cluster-api/pull/12128 will be merged since the diff is very large.

The issue aims to enable usetesting linter and the fix all diagnostics to pass all.

/help

贡献者指南