Preparing report...

Report for github.com/vmware/vmware-go-kcl

(v1.5.0)

A+    Excellent!    Found 26 issues across 39 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!


gocyclo92%

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.

    • clientlibrary/worker/worker.go
    • Line 250: warning: cyclomatic complexity 27 of function (*Worker).eventLoop() is high (> 15) (gocyclo)
    • Line 364: warning: cyclomatic complexity 17 of function (*Worker).rebalance() is high (> 15) (gocyclo)

golint38%

Golint is a linter for Go source code.

    • logger/zap/zap.go
    • Line 33: warning: exported type ZapLogger should have comment or be unexported (golint)
    • Line 94: warning: exported method ZapLogger.Debugf should have comment or be unexported (golint)
    • Line 98: warning: exported method ZapLogger.Infof should have comment or be unexported (golint)
    • Line 102: warning: exported method ZapLogger.Warnf should have comment or be unexported (golint)
    • Line 106: warning: exported method ZapLogger.Errorf should have comment or be unexported (golint)
    • Line 110: warning: exported method ZapLogger.Fatalf should have comment or be unexported (golint)
    • Line 114: warning: exported method ZapLogger.Panicf should have comment or be unexported (golint)
    • Line 118: warning: exported method ZapLogger.WithFields should have comment or be unexported (golint)
    • clientlibrary/utils/awserr.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 25: warning: exported function AWSErrCode should have comment or be unexported (golint)
    • clientlibrary/utils/random.go
    • Line 20: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 36: warning: exported function RandStringBytesMaskImpr should have comment or be unexported (golint)
    • clientlibrary/worker/record-processor-checkpointer.go
    • Line 1: warning: package comment should be of the form "Package worker ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 31: warning: comment on exported type PreparedCheckpointer should be of the form "PreparedCheckpointer ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported type RecordProcessorCheckpointer should be of the form "RecordProcessorCheckpointer ..." (with optional leading article) (golint)
    • Line 51: warning: exported function NewRecordProcessorCheckpoint should have comment or be unexported (golint)
    • Line 58: warning: exported method PreparedCheckpointer.GetPendingCheckpoint should have comment or be unexported (golint)
    • Line 62: warning: exported method PreparedCheckpointer.Checkpoint should have comment or be unexported (golint)
    • Line 66: warning: exported method RecordProcessorCheckpointer.Checkpoint should have comment or be unexported (golint)
    • Line 77: warning: exported method RecordProcessorCheckpointer.PrepareCheckpoint should have comment or be unexported (golint)
    • clientlibrary/config/config.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 57: warning: comment on exported const DefaultInitialPositionInStream should be of the form "DefaultInitialPositionInStream ..." (golint)
    • Line 61: warning: comment on exported const DefaultFailoverTimeMillis should be of the form "DefaultFailoverTimeMillis ..." (golint)
    • Line 67: warning: comment on exported const DefaultLeaseRefreshPeriodMillis should be of the form "DefaultLeaseRefreshPeriodMillis ..." (golint)
    • Line 70: warning: comment on exported const DefaultMaxRecords should be of the form "DefaultMaxRecords ..." (golint)
    • Line 73: warning: comment on exported const DefaultIdletimeBetweenReadsMillis should be of the form "DefaultIdletimeBetweenReadsMillis ..." (golint)
    • Line 77: warning: comment on exported const DefaultDontCallProcessRecordsForEmptyRecordList should be of the form "DefaultDontCallProcessRecordsForEmptyRecordList ..." (golint)
    • Line 80: warning: comment on exported const DefaultParentShardPollIntervalMillis should be of the form "DefaultParentShardPollIntervalMillis ..." (golint)
    • Line 85: warning: comment on exported const DefaultShardSyncIntervalMillis should be of the form "DefaultShardSyncIntervalMillis ..." (golint)
    • Line 88: warning: comment on exported const DefaultCleanupLeasesUponShardsCompletion should be of the form "DefaultCleanupLeasesUponShardsCompletion ..." (golint)
    • Line 93: warning: comment on exported const DefaultTaskBackoffTimeMillis should be of the form "DefaultTaskBackoffTimeMillis ..." (golint)
    • Line 96: warning: comment on exported const DefaultValidateSequenceNumberBeforeCheckpointing should be of the form "DefaultValidateSequenceNumberBeforeCheckpointing ..." (golint)
    • Line 100: warning: comment on exported const DefaultMaxLeasesForWorker should be of the form "DefaultMaxLeasesForWorker ..." (golint)
    • Line 107: warning: comment on exported const DefaultMaxLeasesToStealAtOneTime should be of the form "DefaultMaxLeasesToStealAtOneTime ..." (golint)
    • Line 112: warning: comment on exported const DefaultInitialLeaseTableReadCapacity should be of the form "DefaultInitialLeaseTableReadCapacity ..." (golint)
    • Line 115: warning: comment on exported const DefaultInitialLeaseTableWriteCapacity should be of the form "DefaultInitialLeaseTableWriteCapacity ..." (golint)
    • Line 118: warning: comment on exported const DefaultSkipShardSyncAtStartupIfLeasesExist should be of the form "DefaultSkipShardSyncAtStartupIfLeasesExist ..." (golint)
    • Line 123: warning: comment on exported const DefaultShutdownGraceMillis should be of the form "DefaultShutdownGraceMillis ..." (golint)
    • Line 126: warning: comment on exported const DefaultEnableLeaseStealing should be of the form "DefaultEnableLeaseStealing ..." (golint)
    • Line 129: warning: comment on exported const DefaultLeaseStealingIntervalMillis should be of the form "DefaultLeaseStealingIntervalMillis ..." (golint)
    • Line 132: warning: comment on exported const DefaultLeaseStealingClaimTimeoutMillis should be of the form "DefaultLeaseStealingClaimTimeoutMillis ..." (golint)
    • Line 135: warning: comment on exported const DefaultLeaseSyncingIntervalMillis should be of the form "DefaultLeaseSyncingIntervalMillis ..." (golint)
    • Line 144: warning: comment on exported type InitialPositionInStreamExtended should be of the form "InitialPositionInStreamExtended ..." (with optional leading article) (golint)
    • Line 159: warning: comment on exported type KinesisClientLibConfiguration should be of the form "KinesisClientLibConfiguration ..." (with optional leading article) (golint)
    • Line 293: warning: exported function InitalPositionInStreamToShardIteratorType should have comment or be unexported (golint)
    • clientlibrary/config/kcl-config.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 124: warning: exported method KinesisClientLibConfiguration.WithInitialPositionInStream should have comment or be unexported (golint)
    • Line 130: warning: exported method KinesisClientLibConfiguration.WithTimestampAtInitialPositionInStream should have comment or be unexported (golint)
    • Line 136: warning: exported method KinesisClientLibConfiguration.WithFailoverTimeMillis should have comment or be unexported (golint)
    • Line 142: warning: exported method KinesisClientLibConfiguration.WithLeaseRefreshPeriodMillis should have comment or be unexported (golint)
    • Line 148: warning: exported method KinesisClientLibConfiguration.WithShardSyncIntervalMillis should have comment or be unexported (golint)
    • Line 154: warning: exported method KinesisClientLibConfiguration.WithMaxRecords should have comment or be unexported (golint)
    • Line 168: warning: comment on exported method KinesisClientLibConfiguration.WithIdleTimeBetweenReadsInMillis should be of the form "WithIdleTimeBetweenReadsInMillis ..." (golint)
    • Line 194: warning: exported method KinesisClientLibConfiguration.WithCallProcessRecordsEvenForEmptyRecordList should have comment or be unexported (golint)
    • Line 199: warning: exported method KinesisClientLibConfiguration.WithTaskBackoffTimeMillis should have comment or be unexported (golint)
    • Line 205: warning: exported method KinesisClientLibConfiguration.WithLogger should have comment or be unexported (golint)
    • Line 249: warning: exported method KinesisClientLibConfiguration.WithLeaseStealing should have comment or be unexported (golint)
    • Line 254: warning: exported method KinesisClientLibConfiguration.WithLeaseStealingIntervalMillis should have comment or be unexported (golint)
    • Line 259: warning: exported method KinesisClientLibConfiguration.WithLeaseSyncingIntervalMillis should have comment or be unexported (golint)
    • clientlibrary/partition/partition.go
    • Line 1: warning: package comment should be of the form "Package worker ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 37: warning: exported type ShardStatus should have comment or be unexported (golint)
    • Line 51: warning: exported method ShardStatus.GetLeaseOwner should have comment or be unexported (golint)
    • Line 57: warning: exported method ShardStatus.SetLeaseOwner should have comment or be unexported (golint)
    • Line 63: warning: exported method ShardStatus.GetCheckpoint should have comment or be unexported (golint)
    • Line 69: warning: exported method ShardStatus.SetCheckpoint should have comment or be unexported (golint)
    • Line 75: warning: exported method ShardStatus.GetLeaseTimeout should have comment or be unexported (golint)
    • Line 81: warning: exported method ShardStatus.SetLeaseTimeout should have comment or be unexported (golint)
    • Line 87: warning: exported method ShardStatus.IsClaimRequestExpired should have comment or be unexported (golint)
    • Line 90: 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)
    • logger/logrus.go
    • Line 32: warning: exported type LogrusLogEntry should have comment or be unexported (golint)
    • Line 36: warning: exported type LogrusLogger should have comment or be unexported (golint)
    • Line 94: warning: exported method LogrusLogger.Debugf should have comment or be unexported (golint)
    • Line 98: warning: exported method LogrusLogger.Infof should have comment or be unexported (golint)
    • Line 102: warning: exported method LogrusLogger.Warnf should have comment or be unexported (golint)
    • Line 106: warning: exported method LogrusLogger.Errorf should have comment or be unexported (golint)
    • Line 110: warning: exported method LogrusLogger.Fatalf should have comment or be unexported (golint)
    • Line 114: warning: exported method LogrusLogger.Panicf should have comment or be unexported (golint)
    • Line 118: warning: exported method LogrusLogger.WithFields should have comment or be unexported (golint)
    • Line 124: warning: exported method LogrusLogEntry.Debugf should have comment or be unexported (golint)
    • Line 128: warning: exported method LogrusLogEntry.Infof should have comment or be unexported (golint)
    • Line 132: warning: exported method LogrusLogEntry.Warnf should have comment or be unexported (golint)
    • Line 136: warning: exported method LogrusLogEntry.Errorf should have comment or be unexported (golint)
    • Line 140: warning: exported method LogrusLogEntry.Fatalf should have comment or be unexported (golint)
    • Line 144: warning: exported method LogrusLogEntry.Panicf should have comment or be unexported (golint)
    • Line 148: warning: exported method LogrusLogEntry.WithFields should have comment or be unexported (golint)
    • clientlibrary/metrics/interfaces.go
    • Line 1: warning: package comment should be of the form "Package metrics ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 30: warning: exported type MonitoringService should have comment or be unexported (golint)
    • Line 47: warning: exported method NoopMonitoringService.Init should have comment or be unexported (golint)
    • Line 48: warning: exported method NoopMonitoringService.Start should have comment or be unexported (golint)
    • Line 49: warning: exported method NoopMonitoringService.Shutdown should have comment or be unexported (golint)
    • Line 51: warning: exported method NoopMonitoringService.IncrRecordsProcessed should have comment or be unexported (golint)
    • Line 52: warning: exported method NoopMonitoringService.IncrBytesProcessed should have comment or be unexported (golint)
    • Line 53: warning: exported method NoopMonitoringService.MillisBehindLatest should have comment or be unexported (golint)
    • Line 54: warning: exported method NoopMonitoringService.LeaseGained should have comment or be unexported (golint)
    • Line 55: warning: exported method NoopMonitoringService.LeaseLost should have comment or be unexported (golint)
    • Line 56: warning: exported method NoopMonitoringService.LeaseRenewed should have comment or be unexported (golint)
    • Line 57: warning: exported method NoopMonitoringService.RecordGetRecordsTime should have comment or be unexported (golint)
    • Line 58: warning: exported method NoopMonitoringService.RecordProcessRecordsTime should have comment or be unexported (golint)
    • clientlibrary/metrics/cloudwatch/cloudwatch.go
    • Line 1: warning: package comment should be of the form "Package cloudwatch ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 43: warning: comment on exported const DEFAULT_CLOUDWATCH_METRICS_BUFFER_DURATION should be of the form "DEFAULT_CLOUDWATCH_METRICS_BUFFER_DURATION ..." (golint)
    • Line 46: warning: exported type MonitoringService should have comment or be unexported (golint)
    • Line 91: warning: exported method MonitoringService.Init should have comment or be unexported (golint)
    • Line 114: warning: exported method MonitoringService.Start should have comment or be unexported (golint)
    • Line 121: warning: exported method MonitoringService.Shutdown should have comment or be unexported (golint)
    • Line 283: warning: exported method MonitoringService.IncrRecordsProcessed should have comment or be unexported (golint)
    • Line 290: warning: exported method MonitoringService.IncrBytesProcessed should have comment or be unexported (golint)
    • Line 297: warning: exported method MonitoringService.MillisBehindLatest should have comment or be unexported (golint)
    • Line 304: warning: exported method MonitoringService.LeaseGained should have comment or be unexported (golint)
    • Line 311: warning: exported method MonitoringService.LeaseLost should have comment or be unexported (golint)
    • Line 318: warning: exported method MonitoringService.LeaseRenewed should have comment or be unexported (golint)
    • Line 325: warning: exported method MonitoringService.RecordGetRecordsTime should have comment or be unexported (golint)
    • Line 331: warning: exported method MonitoringService.RecordProcessRecordsTime should have comment or be unexported (golint)
    • clientlibrary/metrics/prometheus/prometheus.go
    • Line 1: warning: package comment should be of the form "Package prometheus ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 67: warning: exported method MonitoringService.Init should have comment or be unexported (golint)
    • Line 120: warning: exported method MonitoringService.Start should have comment or be unexported (golint)
    • Line 134: warning: exported method MonitoringService.Shutdown should have comment or be unexported (golint)
    • Line 136: warning: exported method MonitoringService.IncrRecordsProcessed should have comment or be unexported (golint)
    • Line 140: warning: exported method MonitoringService.IncrBytesProcessed should have comment or be unexported (golint)
    • Line 144: warning: exported method MonitoringService.MillisBehindLatest should have comment or be unexported (golint)
    • Line 148: warning: exported method MonitoringService.LeaseGained should have comment or be unexported (golint)
    • Line 152: warning: exported method MonitoringService.LeaseLost should have comment or be unexported (golint)
    • Line 156: warning: exported method MonitoringService.LeaseRenewed should have comment or be unexported (golint)
    • Line 160: warning: exported method MonitoringService.RecordGetRecordsTime should have comment or be unexported (golint)
    • Line 164: warning: exported method MonitoringService.RecordProcessRecordsTime should have comment or be unexported (golint)
    • clientlibrary/checkpoint/checkpointer.go
    • Line 1: warning: package comment should be of the form "Package checkpoint ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 38: warning: exported const LeaseKeyKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: comment on exported const ShardEnd should be of the form "ShardEnd ..." (golint)
    • Line 52: warning: exported type ErrLeaseNotAcquired should have comment or be unexported (golint)
    • clientlibrary/interfaces/inputs.go
    • Line 1: warning: package comment should be of the form "Package interfaces ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 44: warning: comment on exported const REQUESTED should be of the form "REQUESTED ..." (golint)
    • Line 52: warning: comment on exported const TERMINATE should be of the form "TERMINATE ..." (golint)
    • Line 60: warning: comment on exported const ZOMBIE should be of the form "ZOMBIE ..." (golint)
    • Line 68: warning: comment on exported type InitializationInput should be of the form "InitializationInput ..." (with optional leading article) (golint)
    • Line 68: warning: comment on exported type ProcessRecordsInput should be of the form "ProcessRecordsInput ..." (with optional leading article) (golint)
    • Line 68: warning: comment on exported type ShutdownInput should be of the form "ShutdownInput ..." (with optional leading article) (golint)
    • Line 70: warning: comment on exported type ShutdownReason should be of the form "ShutdownReason ..." (with optional leading article) (golint)
    • Line 120: warning: exported function ShutdownReasonMessage should have comment or be unexported (golint)
    • clientlibrary/interfaces/record-processor-checkpointer.go
    • Line 1: warning: package comment should be of the form "Package interfaces ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 37: warning: exported type IPreparedCheckpointer should have comment or be unexported (golint)
    • Line 59: warning: comment on exported type IRecordProcessorCheckpointer should be of the form "IRecordProcessorCheckpointer ..." (with optional leading article) (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!


misspell89%

Misspell Finds commonly misspelled English words