Skip to content

Commit a355e2e

Browse files
committed
Fixed linter warning
internal/arduino/cores/packagemanager/loader.go:368:6: QF1006: could lift into loop condition (staticcheck) if !board.Properties.ContainsKey(fmt.Sprintf("upload_port.%d.vid", i)) { ^
1 parent 494679a commit a355e2e

File tree

1 file changed

+1
-4
lines changed
  • internal/arduino/cores/packagemanager

1 file changed

+1
-4
lines changed

Diff for: internal/arduino/cores/packagemanager/loader.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,7 @@ func convertLegacyPlatformToPluggableDiscovery(platform *cores.PlatformRelease)
364364

365365
// Add identification properties for network protocol
366366
i := 0
367-
for {
368-
if !board.Properties.ContainsKey(fmt.Sprintf("upload_port.%d.vid", i)) {
369-
break
370-
}
367+
for !board.Properties.ContainsKey(fmt.Sprintf("upload_port.%d.vid", i)) {
371368
i++
372369
}
373370
board.Properties.Set(fmt.Sprintf("upload_port.%d.board", i), board.BoardID)

0 commit comments

Comments
 (0)