Preparing report...

Report for github.com/metal-stack/metal-api

A+    Excellent!    Found 30 issues across 103 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


golint72%

Golint is a linter for Go source code.

    • metal-api/cmd/metal-api/internal/service/v1/partition.go
    • Line 7: warning: exported type PartitionBase should have comment or be unexported (golint)
    • Line 12: warning: exported type PartitionBootConfiguration should have comment or be unexported (golint)
    • Line 18: warning: exported type PartitionCreateRequest should have comment or be unexported (golint)
    • Line 24: warning: exported type PartitionUpdateRequest should have comment or be unexported (golint)
    • Line 30: warning: exported type PartitionResponse should have comment or be unexported (golint)
    • Line 37: warning: exported type PartitionCapacity should have comment or be unexported (golint)
    • Line 42: warning: exported type ServerCapacity should have comment or be unexported (golint)
    • Line 53: warning: exported function NewPartitionResponse should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/common.go
    • Line 7: warning: comment on exported type EmptyBody should be of the form "EmptyBody ..." (with optional leading article) (golint)
    • Line 12: warning: exported type Identifiable should have comment or be unexported (golint)
    • Line 16: warning: exported type Describable should have comment or be unexported (golint)
    • Line 21: warning: exported type Common should have comment or be unexported (golint)
    • Line 26: warning: exported type Timestamps should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/size.go
    • Line 7: warning: exported type SizeConstraint should have comment or be unexported (golint)
    • Line 13: warning: exported type SizeCreateRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type SizeUpdateRequest should have comment or be unexported (golint)
    • Line 23: warning: exported type SizeResponse should have comment or be unexported (golint)
    • Line 29: warning: exported type SizeConstraintMatchingLog should have comment or be unexported (golint)
    • Line 35: warning: exported type SizeMatchingLog should have comment or be unexported (golint)
    • Line 42: warning: exported function NewSizeMatchingLog should have comment or be unexported (golint)
    • Line 64: warning: exported function NewSizeResponse should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/switch.go
    • Line 10: warning: exported type SwitchBase should have comment or be unexported (golint)
    • Line 15: warning: exported type SwitchNics should have comment or be unexported (golint)
    • Line 17: warning: exported type SwitchNic should have comment or be unexported (golint)
    • Line 24: warning: exported type BGPFilter should have comment or be unexported (golint)
    • Line 29: warning: exported function NewBGPFilter should have comment or be unexported (golint)
    • Line 39: warning: exported method SwitchNics.ByMac should have comment or be unexported (golint)
    • Line 47: warning: exported type SwitchConnection should have comment or be unexported (golint)
    • Line 52: warning: exported type SwitchRegisterRequest should have comment or be unexported (golint)
    • Line 59: warning: exported type SwitchUpdateRequest should have comment or be unexported (golint)
    • Line 64: warning: exported type SwitchNotifyRequest should have comment or be unexported (golint)
    • Line 69: warning: exported type SwitchResponse should have comment or be unexported (golint)
    • Line 80: warning: exported type SwitchSync should have comment or be unexported (golint)
    • Line 86: warning: exported function NewSwitchResponse should have comment or be unexported (golint)
    • Line 134: warning: exported function NewSwitch should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/ip.go
    • Line 8: warning: exported type IPBase should have comment or be unexported (golint)
    • Line 15: warning: exported type IPIdentifiable should have comment or be unexported (golint)
    • Line 20: warning: exported type IPAllocateRequest should have comment or be unexported (golint)
    • Line 26: warning: exported type IPUpdateRequest should have comment or be unexported (golint)
    • Line 33: warning: exported type IPFindRequest should have comment or be unexported (golint)
    • Line 37: warning: exported type IPResponse should have comment or be unexported (golint)
    • Line 44: warning: exported function NewIPResponse should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/grpc/wait-service.go
    • Line 26: warning: exported type WaitService should have comment or be unexported (golint)
    • Line 37: warning: exported type Datasource should have comment or be unexported (golint)
    • Line 42: warning: exported function NewWaitService should have comment or be unexported (golint)
    • Line 67: warning: exported method WaitService.NotifyAllocated should have comment or be unexported (golint)
    • Line 107: warning: exported method WaitService.Wait should have comment or be unexported (golint)
    • metal-api/test/integration.go
    • Line 20: warning: exported type ConnectionDetails should have comment or be unexported (golint)
    • Line 28: warning: exported function StartRethink should have comment or be unexported (golint)
    • Line 66: warning: exported function StartPostgres should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/machine.go
    • Line 13: warning: exported type MachineBase should have comment or be unexported (golint)
    • Line 27: warning: exported type MachineAllocation should have comment or be unexported (golint)
    • Line 43: warning: exported type BootInfo should have comment or be unexported (golint)
    • Line 53: warning: exported type MachineNetwork should have comment or be unexported (golint)
    • Line 73: warning: exported type MachineHardwareBase should have comment or be unexported (golint)
    • Line 79: warning: exported type MachineHardware should have comment or be unexported (golint)
    • Line 84: warning: exported type MachineHardwareExtended should have comment or be unexported (golint)
    • Line 89: warning: exported type MachineState should have comment or be unexported (golint)
    • Line 94: warning: exported type ChassisIdentifyLEDState should have comment or be unexported (golint)
    • Line 99: warning: exported type MachineBlockDevice should have comment or be unexported (golint)
    • Line 106: warning: exported type MachineRecentProvisioningEvents should have comment or be unexported (golint)
    • Line 112: warning: exported type MachineProvisioningEvent should have comment or be unexported (golint)
    • Line 118: warning: exported type MachineNics should have comment or be unexported (golint)
    • Line 120: warning: exported type MachineNic should have comment or be unexported (golint)
    • Line 125: warning: exported type MachineNicsExtended should have comment or be unexported (golint)
    • Line 127: warning: exported type MachineNicExtended should have comment or be unexported (golint)
    • Line 132: warning: exported type MachineBIOS should have comment or be unexported (golint)
    • Line 138: warning: exported type MachineIPMI should have comment or be unexported (golint)
    • Line 148: warning: exported type MachineFru should have comment or be unexported (golint)
    • Line 159: warning: exported type MachineRegisterRequest should have comment or be unexported (golint)
    • Line 170: warning: exported type MachineAllocateRequest should have comment or be unexported (golint)
    • Line 185: warning: exported type MachineAllocationNetworks should have comment or be unexported (golint)
    • Line 187: warning: exported type MachineAllocationNetwork should have comment or be unexported (golint)
    • Line 192: warning: exported type MachineDiskPartitions should have comment or be unexported (golint)
    • Line 194: warning: exported type MachineDiskPartition should have comment or be unexported (golint)
    • Line 207: warning: exported type MachineFinalizeAllocationRequest should have comment or be unexported (golint)
    • Line 217: warning: exported type MachineFindRequest should have comment or be unexported (golint)
    • Line 221: warning: exported type MachineResponse should have comment or be unexported (golint)
    • Line 227: warning: exported type MachineIPMIResponse should have comment or be unexported (golint)
    • Line 234: warning: exported type MachineIpmiReport should have comment or be unexported (golint)
    • Line 241: warning: exported type MachineIpmiReports should have comment or be unexported (golint)
    • Line 246: warning: exported type MachineIpmiReportResponse should have comment or be unexported (golint)
    • Line 251: warning: exported type MachineReinstallRequest should have comment or be unexported (golint)
    • Line 256: warning: exported type MachineAbortReinstallRequest should have comment or be unexported (golint)
    • Line 260: warning: exported function NewMetalMachineHardware should have comment or be unexported (golint)
    • Line 309: warning: exported function NewMetalIPMI should have comment or be unexported (golint)
    • Line 363: warning: exported function NewMachineIPMIResponse should have comment or be unexported (golint)
    • Line 390: warning: exported function NewMachineResponse should have comment or be unexported (golint)
    • Line 528: warning: exported function NewMachineRecentProvisioningEvents should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/firmware.go
    • Line 3: warning: exported type Firmware should have comment or be unexported (golint)
    • Line 11: warning: exported type FirmwaresResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type VendorRevisions should have comment or be unexported (golint)
    • Line 19: warning: exported type BoardRevisions should have comment or be unexported (golint)
    • Line 23: warning: exported type MachineUpdateFirmwareRequest should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/service/v1/image.go
    • Line 9: warning: exported type ImageBase should have comment or be unexported (golint)
    • Line 17: warning: exported type ImageCreateRequest should have comment or be unexported (golint)
    • Line 25: warning: exported type ImageUpdateRequest should have comment or be unexported (golint)
    • Line 32: warning: exported type ImageResponse should have comment or be unexported (golint)
    • Line 38: warning: exported function NewImageResponse should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/metal/ip.go
    • Line 98: warning: exported method IP.HasMachineId should have comment or be unexported (golint)
    • Line 103: warning: exported method IP.GetMachineIds should have comment or be unexported (golint)
    • Line 108: warning: exported method IP.AddMachineId should have comment or be unexported (golint)
    • Line 116: warning: exported method IP.RemoveMachineId should have comment or be unexported (golint)
    • Line 123: warning: exported function IpTag should have comment or be unexported (golint)
    • Line 127: warning: exported type IPs should have comment or be unexported (golint)
    • Line 129: warning: exported type IPsMap should have comment or be unexported (golint)
    • Line 131: warning: exported method IPs.ByProjectID should have comment or be unexported (golint)
    • metal-api/cmd/metal-api/internal/grpc/grpc-server.go
    • Line 30: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 46: warning: exported type Server should have comment or be unexported (golint)
    • Line 59: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 88: warning: exported method Server.Serve should have comment or be unexported (golint)

gocyclo98%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words