Preparing report...

Report for github.com/kelda/blimp

A    Great!    Found 81 issues across 122 files

Tweet

gofmt93%

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


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!


gocyclo91%

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.

    • blimp/cli/logs/logs.go
    • Line 347: warning: cyclomatic complexity 21 of function printLogs() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 21 of function (*Command).forwardLogs() is high (> 15) (gocyclo)
    • Line 105: warning: cyclomatic complexity 17 of function (Command).Run() is high (> 15) (gocyclo)
    • blimp/cluster-controller/pod.go
    • Line 275: warning: cyclomatic complexity 25 of function (*podSpec).addRuntimeContainer() is high (> 15) (gocyclo)
    • Line 65: warning: cyclomatic complexity 16 of function newPodBuilder() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 16 of function (podBuilder).ToPod() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • blimp/ci/assert/assert.go
    • Line 8: warning: exported type Test should have comment or be unexported (golint)
    • Line 13: warning: exported type Assertion should have comment or be unexported (golint)
    • blimp/cli/util/pidfile.go
    • Line 15: warning: exported function UpRunning should have comment or be unexported (golint)
    • Line 42: warning: exported function TakeUpLock should have comment or be unexported (golint)
    • Line 51: warning: exported function ReleaseUpLock should have comment or be unexported (golint)
    • blimp/pkg/syncthing/client.go
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 35: warning: exported method Client.GetIDPathMap should have comment or be unexported (golint)
    • Line 51: warning: exported type Mount should have comment or be unexported (golint)
    • Line 135: warning: exported method Mount.ID should have comment or be unexported (golint)
    • Line 150: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 294: warning: exported method Client.Run should have comment or be unexported (golint)
    • Line 413: warning: exported method Client.WriteConfig should have comment or be unexported (golint)
    • blimp/cli/manager/manager.go
    • Line 17: warning: exported var C should have comment or be unexported (golint)
    • Line 19: warning: exported type Client should have comment or be unexported (golint)
    • Line 24: warning: exported function SetupClient should have comment or be unexported (golint)
    • Line 73: warning: exported function CheckServiceStatus should have comment or be unexported (golint)
    • Line 100: warning: exported function CheckServiceRunning should have comment or be unexported (golint)
    • blimp/pkg/build/types.go
    • Line 7: warning: exported type Interface should have comment or be unexported (golint)
    • Line 13: warning: exported type BuildPushConfig should have comment or be unexported (golint)
    • blimp/pkg/errors/errors.go
    • Line 66: warning: error should be the last type when returning multiple items (golint)
    • Line 120: warning: exported function HandleFatalError should have comment or be unexported (golint)
    • blimp/pkg/errors/interceptor.go
    • Line 12: warning: exported function UnaryClientInterceptor should have comment or be unexported (golint)
    • Line 24: warning: exported function UnaryServerInterceptor should have comment or be unexported (golint)
    • blimp/pkg/build/images.go
    • Line 10: warning: exported function BlimpServiceTag should have comment or be unexported (golint)
    • Line 14: warning: exported function RemoteImageName should have comment or be unexported (golint)
    • Line 19: warning: exported function ReplaceTagWithDigest should have comment or be unexported (golint)
    • blimp/pkg/kubewait/kubewait.go
    • Line 15: warning: exported function WaitForObject should have comment or be unexported (golint)
    • Line 49: warning: exported function PodGetter should have comment or be unexported (golint)
    • Line 55: warning: exported function ServiceAccountGetter should have comment or be unexported (golint)
    • Line 61: warning: exported function ServiceGetter should have comment or be unexported (golint)
    • blimp/ci/tests/build/main.go
    • Line 17: warning: exported type Test should have comment or be unexported (golint)
    • Line 19: warning: exported method Test.GetName should have comment or be unexported (golint)
    • Line 55: warning: exported method Test.Run should have comment or be unexported (golint)
    • blimp/pkg/build/buildkit/buildkit.go
    • Line 22: warning: exported type Client should have comment or be unexported (golint)
    • Line 27: warning: exported function New should have comment or be unexported (golint)
    • Line 50: warning: exported method Client.BuildAndPush should have comment or be unexported (golint)
    • blimp/pkg/auth/rpc.go
    • Line 11: warning: exported function AuthorizeRequest should have comment or be unexported (golint)
    • Line 21: warning: exported type AuthenticatedRequest should have comment or be unexported (golint)
    • Line 26: warning: exported function GetAuth should have comment or be unexported (golint)
    • blimp/cli/cp/kubectlcp/kubectl_cp.go
    • Line 18: warning: package comment should be of the form "Package kubectlcp ..." (golint)
    • Line 114: warning: exported type FileSpec should have comment or be unexported (golint)
    • Line 125: warning: exported function ExtractFileSpec should have comment or be unexported (golint)
    • Line 235: warning: exported method CopyOptions.CopyToPod should have comment or be unexported (golint)
    • Line 287: warning: exported method CopyOptions.CopyFromPod should have comment or be unexported (golint)
    • blimp/pkg/syncthing/syncthing.go
    • Line 14: warning: exported const Marker should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: comment on exported const Port should be of the form "Port ..." (golint)
    • Line 54: warning: exported function MapToArgs should have comment or be unexported (golint)
    • Line 64: warning: exported function ArgsToMap should have comment or be unexported (golint)
    • Line 76: warning: exported function MakeMarkers should have comment or be unexported (golint)
    • Line 90: warning: exported function MakeServer should have comment or be unexported (golint)
    • blimp/cli/config/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 15: warning: exported function GetConfig should have comment or be unexported (golint)
    • Line 37: warning: exported method Config.BlimpAuth should have comment or be unexported (golint)
    • blimp/cli/ps/status.go
    • Line 12: warning: exported function GetSandboxStatusString should have comment or be unexported (golint)
    • Line 34: warning: exported function GetStatusString should have comment or be unexported (golint)
    • blimp/pkg/metadata/metadata.go
    • Line 7: warning: exported const AliasesKey should have comment or be unexported (golint)
    • Line 15: warning: exported function ParseAliases should have comment or be unexported (golint)
    • Line 19: warning: exported function Aliases should have comment or be unexported (golint)
    • blimp/ci/tests/volume/main.go
    • Line 8: warning: exported type Test should have comment or be unexported (golint)
    • Line 10: warning: exported method Test.Run should have comment or be unexported (golint)
    • Line 16: warning: exported method Test.GetName should have comment or be unexported (golint)
    • blimp/pkg/expose/annotation.go
    • Line 9: warning: exported type ExposeInfo should have comment or be unexported (golint)
    • Line 17: warning: exported method ExposeAnnotation.ToJson should have comment or be unexported (golint)
    • Line 25: warning: exported function ParseJsonAnnotation should have comment or be unexported (golint)
    • blimp/pkg/kube/watch.go
    • Line 55: warning: exported function NewWatcher should have comment or be unexported (golint)
    • Line 72: warning: exported method Watcher.Watch should have comment or be unexported (golint)
    • blimp/cli/authstore/store.go
    • Line 15: warning: exported type Store should have comment or be unexported (golint)
    • Line 24: warning: exported method Store.KubeClient should have comment or be unexported (golint)
    • Line 37: warning: exported method Store.Save should have comment or be unexported (golint)
    • Line 50: warning: exported function New should have comment or be unexported (golint)
    • blimp/cli/down/down.go
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 57: warning: exported function Run should have comment or be unexported (golint)
    • blimp/node/main.go
    • Line 35: warning: exported const CertPath should have comment (or a comment on this block) or be unexported (golint)
    • blimp/pkg/ports/ports.go
    • Line 4: warning: exported const NodeControllerInternalPort should have comment (or a comment on this block) or be unexported (golint)
    • blimp/cli/logs/logs.go
    • Line 30: warning: exported type Command should have comment or be unexported (golint)
    • Line 70: warning: exported function New should have comment or be unexported (golint)
    • Line 105: warning: exported method Command.Run should have comment or be unexported (golint)
    • blimp/ci/examples/examples.go
    • Line 16: warning: exported type Test should have comment or be unexported (golint)
    • Line 23: warning: exported method Test.GetName should have comment or be unexported (golint)
    • Line 27: warning: exported method Test.Run should have comment or be unexported (golint)
    • blimp/cluster-controller/httpapi/stream.go
    • Line 23: warning: exported type StreamRPC should have comment or be unexported (golint)
    • Line 44: warning: exported method WebSocketStream.SetHeader should have comment or be unexported (golint)
    • Line 47: warning: exported method WebSocketStream.SendHeader should have comment or be unexported (golint)
    • Line 50: warning: exported method WebSocketStream.SetTrailer should have comment or be unexported (golint)
    • Line 52: warning: exported method WebSocketStream.Context should have comment or be unexported (golint)
    • Line 55: warning: exported method WebSocketStream.SendMsg should have comment or be unexported (golint)
    • Line 58: warning: exported method WebSocketStream.RecvMsg should have comment or be unexported (golint)
    • Line 62: warning: exported method StreamHandler.Handler should have comment or be unexported (golint)
    • blimp/ci/file/file.go
    • Line 10: warning: exported type Modifier should have comment or be unexported (golint)
    • Line 12: warning: exported function Modify should have comment or be unexported (golint)
    • Line 30: warning: exported function Replace should have comment or be unexported (golint)
    • Line 39: warning: exported function DeleteLine should have comment or be unexported (golint)
    • blimp/ci/assert/codechange.go
    • Line 35: warning: exported method CodeChangeTest.Run should have comment or be unexported (golint)
    • Line 68: warning: exported method CodeChangeTest.GetName should have comment or be unexported (golint)
    • blimp/ci/assert/http.go
    • Line 18: warning: exported type HTTPPostTest should have comment or be unexported (golint)
    • Line 24: warning: exported type HTTPGetTest should have comment or be unexported (golint)
    • Line 30: warning: exported method HTTPPostTest.Run should have comment or be unexported (golint)
    • Line 45: warning: exported method HTTPPostTest.GetName should have comment or be unexported (golint)
    • Line 49: warning: exported method HTTPGetTest.Run should have comment or be unexported (golint)
    • Line 64: warning: exported method HTTPGetTest.GetName should have comment or be unexported (golint)
    • Line 83: warning: exported function HTTPGetShouldNotContain should have comment or be unexported (golint)
    • Line 98: warning: exported function HTTPGetShouldContain should have comment or be unexported (golint)
    • Line 113: warning: exported function HTTPGetShouldEqual should have comment or be unexported (golint)
    • blimp/pkg/auth/docker.go
    • Line 27: warning: exported type RegistryCredentials should have comment or be unexported (golint)
    • Line 69: warning: exported method RegistryCredentials.LookupByHost should have comment or be unexported (golint)
    • Line 80: warning: exported method RegistryCredentials.LookupByImage should have comment or be unexported (golint)
    • Line 89: warning: exported method RegistryCredentials.ToProtobuf should have comment or be unexported (golint)
    • Line 100: warning: exported function RegistryAuthHeader should have comment or be unexported (golint)
    • Line 112: warning: exported type BlimpRegistryAuth should have comment or be unexported (golint)
    • Line 117: warning: exported function BlimpRegcred should have comment or be unexported (golint)
    • Line 130: warning: exported method BlimpRegistryAuth.ToProtobuf should have comment or be unexported (golint)
    • Line 137: warning: exported method BlimpRegistryAuth.ToContainerRegistry should have comment or be unexported (golint)
    • Line 144: warning: exported method BlimpRegistryAuth.ToDocker should have comment or be unexported (golint)
    • Line 151: warning: exported method BlimpRegistryAuth.ToBlimpAuth should have comment or be unexported (golint)
    • blimp/node/wait/sync.go
    • Line 54: warning: exported function NewSyncTracker should have comment or be unexported (golint)
    • Line 58: warning: exported method SyncTracker.RunServer should have comment or be unexported (golint)
    • blimp/pkg/auth/auth.go
    • Line 7: warning: exported type User should have comment or be unexported (golint)
    • Line 11: warning: comment on exported function ParseIDToken should be of the form "ParseIDToken ..." (golint)
    • blimp/pkg/kube/names.go
    • Line 4: warning: exported const ContainerNameCopyVCP should have comment (or a comment on this block) or be unexported (golint)
    • blimp/pkg/tunnel/tunnel.go
    • Line 22: warning: exported function ServerStream should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function Client should be of the form "Client ..." (golint)
    • blimp/pkg/syncthing/api.go
    • Line 17: warning: exported type APIClient should have comment or be unexported (golint)
    • Line 21: warning: exported type Status should have comment or be unexported (golint)
    • Line 25: warning: exported type Completion should have comment or be unexported (golint)
    • Line 31: warning: exported type Connections should have comment or be unexported (golint)
    • Line 35: warning: exported type Connection should have comment or be unexported (golint)
    • Line 39: warning: exported method APIClient.OverrideVersion should have comment or be unexported (golint)
    • Line 43: warning: exported method APIClient.Restart should have comment or be unexported (golint)
    • Line 47: warning: exported method APIClient.Reset should have comment or be unexported (golint)
    • Line 51: warning: exported method APIClient.GetStatus should have comment or be unexported (golint)
    • Line 56: warning: exported method APIClient.GetCompletion should have comment or be unexported (golint)
    • Line 65: warning: exported method APIClient.GetConnections should have comment or be unexported (golint)
    • Line 70: warning: exported method APIClient.Ping should have comment or be unexported (golint)
    • blimp/pkg/tunnel/manager.go
    • Line 13: warning: exported type Manager should have comment or be unexported (golint)
    • Line 18: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 22: warning: exported method Manager.Run should have comment or be unexported (golint)
    • blimp/ci/tests/buildcache/main.go
    • Line 8: warning: exported type Test should have comment or be unexported (golint)
    • Line 10: warning: exported method Test.Run should have comment or be unexported (golint)
    • Line 15: warning: exported method Test.GetName should have comment or be unexported (golint)
    • blimp/ci/tests/logs/main.go
    • Line 8: warning: exported type Test should have comment or be unexported (golint)
    • Line 10: warning: exported method Test.Run should have comment or be unexported (golint)
    • Line 14: warning: exported method Test.GetName should have comment or be unexported (golint)
    • blimp/pkg/cfgdir/cfgdir.go
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported var ConfigDir should have comment or be unexported (golint)
    • Line 35: warning: exported function Create should have comment or be unexported (golint)
    • Line 43: warning: exported function Expand should have comment or be unexported (golint)
    • Line 47: warning: exported function CLILogFile should have comment or be unexported (golint)
    • Line 51: warning: exported function ParseConfig should have comment or be unexported (golint)
    • blimp/pkg/hash/hash.go
    • Line 8: warning: comment on exported function DNSCompliant should be of the form "DNSCompliant ..." (golint)
    • Line 13: warning: exported function Bytes should have comment or be unexported (golint)
    • blimp/node/wait/wait.go
    • Line 35: warning: comment on exported type Waiter should be of the form "Waiter ..." (with optional leading article) (golint)
    • Line 51: warning: exported const Port should have comment or be unexported (golint)
    • Line 53: warning: exported function Run should have comment or be unexported (golint)
    • blimp/pkg/kube/deploy.go
    • Line 17: warning: exported function DeployRole should have comment or be unexported (golint)
    • Line 29: warning: exported function DeployClusterRole should have comment or be unexported (golint)
    • Line 41: warning: exported function DeployRoleBinding should have comment or be unexported (golint)
    • Line 53: warning: exported function DeployClusterRoleBinding should have comment or be unexported (golint)
    • Line 65: warning: exported type Sanitizer should have comment or be unexported (golint)
    • Line 67: warning: exported type DeployPodOptions should have comment or be unexported (golint)
    • Line 72: warning: exported function DeployPod should have comment or be unexported (golint)
    • Line 128: warning: exported function DeployServiceAccount should have comment or be unexported (golint)
    • Line 132: warning: exported function DeployClusterServiceAccount should have comment or be unexported (golint)
    • Line 212: warning: exported function DeployConfigMap should have comment or be unexported (golint)
    • Line 226: warning: exported function SanitizeIgnoreInitContainerImages should have comment or be unexported (golint)
    • Line 239: warning: exported function SanitizeIgnoreNodeAffinity should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!