File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ func Test_parseGithubRemote(t *testing.T) {
3333 },
3434 }
3535 for _ , tt := range tests {
36- tt := tt // pin to avoid scope issues (see scopelint)
3736 t .Run (tt .name , func (t * testing.T ) {
3837 gotOwner , gotRepo , gotOk := parseGithubRemote (tt .remoteURL )
3938 if gotOwner != tt .wantOwner {
@@ -62,19 +61,19 @@ func Test_githubRepoDetect(t *testing.T) {
6261}
6362
6463func Benchmark_detectRemoteURL_GoGit (b * testing.B ) {
65- for i := 0 ; i < b . N ; i ++ {
64+ for b . Loop () {
6665 _detectRemoteURL_GoGit ("." )
6766 }
6867}
6968
7069func Benchmark_detectRemoteURL_LocalGit (b * testing.B ) {
71- for i := 0 ; i < b . N ; i ++ {
70+ for b . Loop () {
7271 _detectRemoteURL_LocalGit ("." )
7372 }
7473}
7574
7675func Benchmark_parseGithubRemote (b * testing.B ) {
77- for i := 0 ; i < b . N ; i ++ {
76+ for b . Loop () {
7877 parseGithubRemote ("https://github.com/mroth/bump.git" )
7978 }
8079}
Original file line number Diff line number Diff line change 2424// VerboseLogging sets whether to log debug/timing info to stderr
2525var VerboseLogging = false
2626
27- func logVerbose (format string , v ... interface {} ) {
27+ func logVerbose (format string , v ... any ) {
2828 if VerboseLogging {
2929 log .Printf (format , v ... )
3030 }
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ func TestOptionsPrecedence(t *testing.T) {
8585
8686 originalEnv := os .Environ ()
8787 for _ , tC := range testCases {
88- tC := tC // pin to avoid scope issues (see scopelint)
8988 t .Run (tC .desc , func (t * testing.T ) {
9089 resetEnviron (tC .env )
9190 actualOpts , _ := ParseFlags (NewOptionsFromEnv (), tC .args )
You can’t perform that action at this time.
0 commit comments