Implement Components Availability API Endpoint #26
Annotations
10 errors
lint:
internal/api/v2/v2.go#L388
cognitive complexity 24 of func `GetComponentsAvailabilityHandler` is high (> 20) (gocognit)
|
lint:
internal/api/v2/v2.go#L459
cognitive complexity 22 of func `calculateAvailability` is high (> 20) (gocognit)
|
lint:
internal/api/v2/v2_test.go#L55
Comment should end in a period (godot)
|
lint:
internal/api/v2/v2_test.go#L70
increment-decrement: should replace year -= 1 with year-- (revive)
|
lint:
internal/api/v2/v2.go#L416
unnecessary leading newline (whitespace)
|
lint:
internal/api/v2/v2.go#L432
shadow: declaration of "err" shadows declaration at line 392 (govet)
|
lint:
internal/api/v2/v2.go#L510
for loop can be changed to use an integer range (Go 1.22+) (intrange)
|
lint:
internal/api/v2/v2_test.go#L77
for loop can be changed to use an integer range (Go 1.22+) (intrange)
|
lint:
internal/api/v2/v2_test.go#L133
for loop can be changed to use an integer range (Go 1.22+) (intrange)
|
lint:
internal/api/v2/v2.go#L463
Magic number: 12, in <argument> detected (mnd)
|