Preparing report...

Report for github.com/knative/client

A+    Excellent!    Found 83 issues across 362 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!


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.


golint78%

Golint is a linter for Go source code.

    • client/lib/test/integration.go
    • Line 29: warning: exported const MaxRetries should have comment (or a comment on this block) or be unexported (golint)
    • Line 178: warning: exported function CurrentDir should have comment or be unexported (golint)
    • client/lib/test/subscription.go
    • Line 27: warning: exported function SubscriptionCreate should have comment or be unexported (golint)
    • Line 37: warning: exported function SubscriptionList should have comment or be unexported (golint)
    • Line 45: warning: exported function SubscriptionDescribe should have comment or be unexported (golint)
    • Line 53: warning: exported function SubscriptionDelete should have comment or be unexported (golint)
    • Line 59: warning: exported function SubscriptionUpdate should have comment or be unexported (golint)
    • client/pkg/serving/v1/client.go
    • Line 43: warning: comment on exported type ServiceUpdateFunc should be of the form "ServiceUpdateFunc ..." (with optional leading article) (golint)
    • Line 47: warning: comment on exported type KnServingClient should be of the form "KnServingClient ..." (with optional leading article) (golint)
    • Line 127: warning: comment on exported type ListConfig should be of the form "ListConfig ..." (with optional leading article) (golint)
    • Line 130: warning: exported type ListConfigs should have comment or be unexported (golint)
    • Line 148: warning: comment on exported function WithName should be of the form "WithName ..." (golint)
    • Line 155: warning: comment on exported function WithService should be of the form "WithService ..." (golint)
    • Line 174: warning: comment on exported function NewKnServingClient should be of the form "NewKnServingClient ..." (golint)
    • Line 352: warning: error should be the last type when returning multiple items (golint)
    • Line 388: warning: exported type NoBaseRevisionError should have comment or be unexported (golint)
    • client/pkg/util/parsing_helper.go
    • Line 49: warning: exported function MapFromArrayAllowingSingles should have comment or be unexported (golint)
    • Line 53: warning: exported function MapFromArray should have comment or be unexported (golint)
    • Line 57: warning: exported function Add should have comment or be unexported (golint)
    • Line 67: warning: exported function ParseMinusSuffix should have comment or be unexported (golint)
    • client/pkg/kn/commands/describe.go
    • Line 31: warning: comment on exported const TruncateAt should be of the form "TruncateAt ..." (golint)
    • Line 34: warning: exported function WriteMetadata should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function WriteMapDesc should be of the form "WriteMapDesc ..." (golint)
    • Line 85: warning: exported function Age should have comment or be unexported (golint)
    • Line 163: warning: comment on exported function WriteConditions should be of the form "WriteConditions ..." (golint)
    • Line 181: warning: comment on exported function WriteSliceDesc should be of the form "WriteSliceDesc ..." (golint)
    • client/pkg/messaging/v1/subscriptions_client_mock.go
    • Line 28: warning: exported type MockKnSubscriptionsClient should have comment or be unexported (golint)
    • Line 50: warning: comment on exported type SubscriptionsRecorder should be of the form "SubscriptionsRecorder ..." (with optional leading article) (golint)
    • Line 120: warning: comment on exported method SubscriptionsRecorder.Validate should be of the form "Validate ..." (golint)
    • client/pkg/kn/config/testing.go
    • Line 17: warning: comment on exported type TestConfig should be of the form "TestConfig ..." (with optional leading article) (golint)
    • Line 31: warning: exported method TestConfig.PluginsDir should have comment or be unexported (golint)
    • Line 32: warning: exported method TestConfig.ConfigFile should have comment or be unexported (golint)
    • Line 33: warning: exported method TestConfig.LookupPluginsInPath should have comment or be unexported (golint)
    • Line 34: warning: exported method TestConfig.SinkMappings should have comment or be unexported (golint)
    • Line 35: warning: exported method TestConfig.ChannelTypeMappings should have comment or be unexported (golint)
    • client/pkg/templates/command_groups.go
    • Line 23: warning: comment on exported type CommandGroup should be of the form "CommandGroup ..." (with optional leading article) (golint)
    • Line 33: warning: exported type CommandGroups should have comment or be unexported (golint)
    • Line 35: warning: comment on exported method CommandGroups.AddTo should be of the form "AddTo ..." (golint)
    • client/pkg/kn/commands/revision/describe.go
    • Line 39: warning: exported function NewRevisionDescribeCommand should have comment or be unexported (golint)
    • Line 131: warning: exported function WriteConcurrencyOptions should have comment or be unexported (golint)
    • Line 154: warning: comment on exported function WriteImage should be of the form "WriteImage ..." (golint)
    • Line 185: warning: exported function WritePort should have comment or be unexported (golint)
    • Line 192: warning: exported function WriteEnv should have comment or be unexported (golint)
    • Line 199: warning: exported function WriteEnvFrom should have comment or be unexported (golint)
    • Line 206: warning: exported function WriteReplicas should have comment or be unexported (golint)
    • Line 214: warning: exported function WriteScale should have comment or be unexported (golint)
    • Line 225: warning: exported function WriteResources should have comment or be unexported (golint)
    • client/pkg/sources/v1beta2/ping_client.go
    • Line 34: warning: comment on exported type KnPingSourcesClient should be of the form "KnPingSourcesClient ..." (with optional leading article) (golint)
    • Line 152: warning: exported type PingSourceBuilder should have comment or be unexported (golint)
    • Line 156: warning: exported function NewPingSourceBuilder should have comment or be unexported (golint)
    • Line 164: warning: exported function NewPingSourceBuilderFromExisting should have comment or be unexported (golint)
    • Line 168: warning: exported method PingSourceBuilder.Schedule should have comment or be unexported (golint)
    • Line 173: warning: exported method PingSourceBuilder.Data should have comment or be unexported (golint)
    • Line 178: warning: exported method PingSourceBuilder.Sink should have comment or be unexported (golint)
    • Line 204: warning: exported method PingSourceBuilder.Build should have comment or be unexported (golint)
    • client/pkg/kn/commands/flags/traffic.go
    • Line 21: warning: exported type Traffic should have comment or be unexported (golint)
    • Line 27: warning: exported method Traffic.Add should have comment or be unexported (golint)
    • Line 46: warning: exported method Traffic.PercentagesChanged should have comment or be unexported (golint)
    • Line 50: warning: exported method Traffic.TagsChanged should have comment or be unexported (golint)
    • Line 54: warning: exported method Traffic.Changed should have comment or be unexported (golint)
    • client/pkg/util/orderedmap.go
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 84: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 144: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • client/pkg/messaging/v1/channels_client_mock.go
    • Line 26: warning: exported type MockKnChannelsClient should have comment or be unexported (golint)
    • Line 46: warning: comment on exported type ChannelsRecorder should be of the form "ChannelsRecorder ..." (with optional leading article) (golint)
    • Line 105: warning: comment on exported method ChannelsRecorder.Validate should be of the form "Validate ..." (golint)
    • client/pkg/kn/commands/flags/listprint.go
    • Line 29: warning: comment on exported type ListPrintFlags should be of the form "ListPrintFlags ..." (with optional leading article) (golint)
    • Line 88: warning: comment on exported function NewListPrintFlags should be of the form "NewListPrintFlags ..." (golint)
    • client/pkg/kn/commands/wait_flags.go
    • Line 25: warning: comment on exported const WaitDefaultTimeout should be of the form "WaitDefaultTimeout ..." (golint)
    • Line 30: warning: comment on exported type WaitFlags should be of the form "WaitFlags ..." (with optional leading article) (golint)
    • Line 38: warning: comment on exported method WaitFlags.AddConditionWaitFlags should be of the form "AddConditionWaitFlags ..." (golint)
    • client/lib/test/channel.go
    • Line 25: warning: exported function ChannelCreate should have comment or be unexported (golint)
    • Line 35: warning: exported function ChannelList should have comment or be unexported (golint)
    • Line 43: warning: exported function ChannelDescribe should have comment or be unexported (golint)
    • Line 51: warning: exported function ChannelDelete should have comment or be unexported (golint)
    • client/pkg/wait/test_wait_helper.go
    • Line 27: warning: comment on exported type FakeWatch should be of the form "FakeWatch ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported function NewFakeWatch should be of the form "NewFakeWatch ..." (golint)
    • Line 55: warning: comment on exported method FakeWatch.ResultChan should be of the form "ResultChan ..." (golint)
    • Line 66: warning: comment on exported function CreateTestServiceWithConditions should be of the form "CreateTestServiceWithConditions ..." (golint)
    • client/pkg/sources/v1/binding_client.go
    • Line 173: warning: comment on exported method SinkBindingBuilder.Subject should be of the form "Subject ..." (golint)
    • Line 179: warning: comment on exported method SinkBindingBuilder.SubjectGVK should be of the form "SubjectGVK ..." (golint)
    • Line 185: warning: comment on exported method SinkBindingBuilder.SubjectName should be of the form "SubjectName ..." (golint)
    • Line 191: warning: comment on exported method SinkBindingBuilder.SubjectNamespace should be of the form "SubjectNamespace ..." (golint)
    • Line 197: warning: comment on exported method SinkBindingBuilder.AddSubjectMatchLabel should be of the form "AddSubjectMatchLabel ..." (golint)
    • Line 206: warning: comment on exported method SinkBindingBuilder.Sink should be of the form "Sink ..." (golint)
    • client/pkg/serving/revision_template.go
    • Line 27: warning: exported type Scaling should have comment or be unexported (golint)
    • Line 32: warning: exported function ContainerOfRevisionTemplate should have comment or be unexported (golint)
    • Line 36: warning: exported function ContainerOfRevisionSpec should have comment or be unexported (golint)
    • Line 43: warning: exported function ScalingInfo should have comment or be unexported (golint)
    • Line 57: warning: exported function UserImage should have comment or be unexported (golint)
    • Line 61: warning: exported function ConcurrencyTarget should have comment or be unexported (golint)
    • Line 66: warning: exported function ConcurrencyTargetUtilization should have comment or be unexported (golint)
    • Line 71: warning: exported function AutoscaleWindow should have comment or be unexported (golint)
    • Line 75: warning: exported function Port should have comment or be unexported (golint)
    • client/pkg/kn/commands/domain/domain.go
    • Line 45: warning: exported type RefFlags should have comment or be unexported (golint)
    • Line 62: warning: exported method RefFlags.Add should have comment or be unexported (golint)
    • Line 73: warning: exported method RefFlags.Resolve should have comment or be unexported (golint)
    • client/pkg/kn/commands/human_readable_flags.go
    • Line 71: warning: comment on exported function ConditionsValue should be of the form "ConditionsValue ..." (golint)
    • Line 82: warning: comment on exported function ReadyCondition should be of the form "ReadyCondition ..." (golint)
    • Line 109: warning: comment on exported function TranslateTimestampSince should be of the form "TranslateTimestampSince ..." (golint)
    • client/pkg/kn/config/types.go
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 39: warning: comment on exported type SinkMapping should be of the form "SinkMapping ..." (with optional leading article) (golint)
    • client/pkg/util/mock/mock_helper.go
    • Line 25: warning: comment on exported type ApiMethodCall should be of the form "ApiMethodCall ..." (with optional leading article) (golint)
    • Line 55: warning: comment on exported method Recorder.Shift should be of the form "Shift ..." (golint)
    • Line 66: warning: exported function NewRecorder should have comment or be unexported (golint)
    • Line 74: warning: exported method Recorder.Namespace should have comment or be unexported (golint)
    • Line 78: warning: comment on exported method Recorder.CheckThatAllRecordedMethodsHaveBeenCalled should be of the form "CheckThatAllRecordedMethodsHaveBeenCalled ..." (golint)
    • Line 87: warning: comment on exported method Recorder.VerifyCall should be of the form "VerifyCall ..." (golint)
    • Line 120: warning: comment on exported function Any should be of the form "Any ..." (golint)
    • Line 125: warning: comment on exported function ErrorOrNil should be of the form "ErrorOrNil ..." (golint)
    • client/pkg/messaging/v1/subscriptions_client.go
    • Line 160: warning: exported method SubscriptionBuilder.Subscriber should have comment or be unexported (golint)
    • Line 169: warning: exported method SubscriptionBuilder.Reply should have comment or be unexported (golint)
    • Line 178: warning: exported method SubscriptionBuilder.DeadLetterSink should have comment or be unexported (golint)
    • client/pkg/wait/wait_for_ready.go
    • Line 44: warning: comment on exported type Wait should be of the form "Wait ..." (with optional leading article) (golint)
    • Line 54: warning: exported type Options should have comment or be unexported (golint)
    • Line 63: warning: comment on exported type WatchMaker should be of the form "WatchMaker ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported type ConditionsExtractor should be of the form "ConditionsExtractor ..." (with optional leading article) (golint)
    • Line 69: warning: comment on exported type MessageCallback should be of the form "MessageCallback ..." (with optional leading article) (golint)
    • Line 112: warning: error should be the last type when returning multiple items (golint)
    • Line 243: warning: error should be the last type when returning multiple items (golint)
    • client/pkg/kn/plugin/verify.go
    • Line 28: warning: comment on exported type VerificationErrorsAndWarnings should be of the form "VerificationErrorsAndWarnings ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported method Manager.Verify should be of the form "Verify ..." (golint)
    • Line 215: warning: exported method VerificationErrorsAndWarnings.AddError should have comment or be unexported (golint)
    • Line 220: warning: exported method VerificationErrorsAndWarnings.AddWarning should have comment or be unexported (golint)
    • Line 225: warning: exported method VerificationErrorsAndWarnings.PrintWarningsAndErrors should have comment or be unexported (golint)
    • Line 230: warning: exported method VerificationErrorsAndWarnings.HasErrors should have comment or be unexported (golint)
    • Line 234: warning: exported method VerificationErrorsAndWarnings.IsEmpty should have comment or be unexported (golint)
    • client/pkg/templates/template_engine.go
    • Line 36: warning: comment on exported function NewGlobalOptionsFunc should be of the form "NewGlobalOptionsFunc ..." (golint)
    • Line 177: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • client/pkg/sources/v1beta2/ping_client_mock.go
    • Line 25: warning: exported type MockKnPingSourceClient should have comment or be unexported (golint)
    • Line 45: warning: comment on exported type PingSourcesRecorder should be of the form "PingSourcesRecorder ..." (with optional leading article) (golint)
    • Line 93: warning: comment on exported method PingSourcesRecorder.DeletePingSource should be of the form "DeletePingSource ..." (golint)
    • Line 115: warning: comment on exported method PingSourcesRecorder.Validate should be of the form "Validate ..." (golint)
    • client/pkg/kn/plugin/manager.go
    • Line 33: warning: comment on exported var InternalPlugins should be of the form "InternalPlugins ..." (golint)
    • Line 36: warning: comment on exported type Plugin should be of the form "Plugin ..." (with optional leading article) (golint)
    • Line 55: warning: exported type Manager should have comment or be unexported (golint)
    • Line 77: warning: comment on exported type PluginList should be of the form "PluginList ..." (with optional leading article) (golint)
    • client/pkg/util/schema_handling.go
    • Line 24: warning: exported function UpdateGroupVersionKindWithScheme should have comment or be unexported (golint)
    • Line 33: warning: exported function GetGroupVersionKind should have comment or be unexported (golint)
    • client/pkg/serving/v1/client_mock.go
    • Line 31: warning: exported type MockKnServingClient should have comment or be unexported (golint)
    • Line 48: warning: comment on exported type ServingRecorder should be of the form "ServingRecorder ..." (with optional leading article) (golint)
    • Line 53: warning: comment on exported method MockKnServingClient.Recorder should be of the form "Recorder ..." (golint)
    • Line 63: warning: comment on exported method ServingRecorder.GetService should be of the form "GetService ..." (golint)
    • Line 68: warning: exported method MockKnServingClient.GetService should have comment or be unexported (golint)
    • Line 73: warning: comment on exported method ServingRecorder.ListServices should be of the form "ListServices ..." (golint)
    • Line 78: warning: exported method MockKnServingClient.ListServices should have comment or be unexported (golint)
    • Line 83: warning: comment on exported method ServingRecorder.CreateService should be of the form "CreateService ..." (golint)
    • Line 88: warning: exported method MockKnServingClient.CreateService should have comment or be unexported (golint)
    • Line 93: warning: comment on exported method ServingRecorder.UpdateService should be of the form "UpdateService ..." (golint)
    • Line 98: warning: exported method MockKnServingClient.UpdateService should have comment or be unexported (golint)
    • Line 103: warning: comment on exported method MockKnServingClient.UpdateServiceWithRetry should be of the form "UpdateServiceWithRetry ..." (golint)
    • Line 108: warning: comment on exported method ServingRecorder.ApplyService should be of the form "ApplyService ..." (golint)
    • Line 113: warning: exported method MockKnServingClient.ApplyService should have comment or be unexported (golint)
    • Line 118: warning: comment on exported method ServingRecorder.DeleteService should be of the form "DeleteService ..." (golint)
    • Line 123: warning: exported method MockKnServingClient.DeleteService should have comment or be unexported (golint)
    • Line 128: warning: comment on exported method ServingRecorder.WaitForService should be of the form "WaitForService ..." (golint)
    • Line 133: warning: error should be the last type when returning multiple items (golint)
    • Line 133: warning: exported method MockKnServingClient.WaitForService should have comment or be unexported (golint)
    • Line 138: warning: comment on exported method ServingRecorder.GetRevision should be of the form "GetRevision ..." (golint)
    • Line 143: warning: exported method MockKnServingClient.GetRevision should have comment or be unexported (golint)
    • Line 148: warning: comment on exported method ServingRecorder.ListRevisions should be of the form "ListRevisions ..." (golint)
    • Line 153: warning: exported method MockKnServingClient.ListRevisions should have comment or be unexported (golint)
    • Line 158: warning: comment on exported method ServingRecorder.DeleteRevision should be of the form "DeleteRevision ..." (golint)
    • Line 163: warning: exported method MockKnServingClient.DeleteRevision should have comment or be unexported (golint)
    • Line 168: warning: comment on exported method ServingRecorder.GetRoute should be of the form "GetRoute ..." (golint)
    • Line 173: warning: exported method MockKnServingClient.GetRoute should have comment or be unexported (golint)
    • Line 179: warning: comment on exported method ServingRecorder.ListRoutes should be of the form "ListRoutes ..." (golint)
    • Line 184: warning: exported method MockKnServingClient.ListRoutes should have comment or be unexported (golint)
    • Line 228: warning: comment on exported method ServingRecorder.Validate should be of the form "Validate ..." (golint)
    • client/pkg/util/logging_http_transport.go
    • Line 36: warning: exported type LoggingHttpTransport should have comment or be unexported (golint)
    • Line 41: warning: exported function NewLoggingTransport should have comment or be unexported (golint)
    • Line 45: warning: exported function NewLoggingTransportWithStream should have comment or be unexported (golint)
    • Line 49: warning: exported method LoggingHttpTransport.RoundTrip should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!