Preparing report...

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

(v0.0.0-20211223041606-c02b7a85d45f)

A+    Excellent!    Found 24 issues across 42 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 268: warning: cyclomatic complexity 27 of function (*Worker).eventLoop() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 17 of function (*Worker).rebalance() is high (> 15) (gocyclo)

golint47%

Golint is a linter for Go source code.

    • internal/deaggregator/deaggregator.go
    • Line 1: warning: package comment should be of the form "Package deaggregator ..." (golint)
    • Line 20: warning: exported const KplMagicLen should have comment (or a comment on this block) or be unexported (golint)
    • clientlibrary/config/kcl-config.go
    • Line 127: warning: exported method KinesisClientLibConfiguration.WithInitialPositionInStream should have comment or be unexported (golint)
    • Line 133: warning: exported method KinesisClientLibConfiguration.WithTimestampAtInitialPositionInStream should have comment or be unexported (golint)
    • Line 139: warning: exported method KinesisClientLibConfiguration.WithFailoverTimeMillis should have comment or be unexported (golint)
    • Line 145: warning: exported method KinesisClientLibConfiguration.WithLeaseRefreshPeriodMillis should have comment or be unexported (golint)
    • Line 151: warning: exported method KinesisClientLibConfiguration.WithShardSyncIntervalMillis should have comment or be unexported (golint)
    • Line 157: warning: exported method KinesisClientLibConfiguration.WithMaxRecords should have comment or be unexported (golint)
    • Line 171: warning: comment on exported method KinesisClientLibConfiguration.WithIdleTimeBetweenReadsInMillis should be of the form "WithIdleTimeBetweenReadsInMillis ..." (golint)
    • Line 195: warning: exported method KinesisClientLibConfiguration.WithCallProcessRecordsEvenForEmptyRecordList should have comment or be unexported (golint)
    • Line 200: warning: exported method KinesisClientLibConfiguration.WithTaskBackoffTimeMillis should have comment or be unexported (golint)
    • Line 206: warning: exported method KinesisClientLibConfiguration.WithLogger should have comment or be unexported (golint)
    • Line 250: warning: exported method KinesisClientLibConfiguration.WithLeaseStealing should have comment or be unexported (golint)
    • Line 255: warning: exported method KinesisClientLibConfiguration.WithLeaseStealingIntervalMillis should have comment or be unexported (golint)
    • Line 260: warning: exported method KinesisClientLibConfiguration.WithLeaseSyncingIntervalMillis should have comment or be unexported (golint)
    • clientlibrary/worker/record-processor-checkpointer.go
    • Line 20: warning: package comment should be of the form "Package worker ..." (golint)
    • Line 33: warning: comment on exported type PreparedCheckpointer should be of the form "PreparedCheckpointer ..." (with optional leading article) (golint)
    • Line 44: warning: comment on exported type RecordProcessorCheckpointer should be of the form "RecordProcessorCheckpointer ..." (with optional leading article) (golint)
    • Line 56: warning: exported function NewRecordProcessorCheckpoint should have comment or be unexported (golint)
    • Line 63: warning: exported method PreparedCheckpointer.GetPendingCheckpoint should have comment or be unexported (golint)
    • Line 67: warning: exported method PreparedCheckpointer.Checkpoint should have comment or be unexported (golint)
    • Line 71: warning: exported method RecordProcessorCheckpointer.Checkpoint should have comment or be unexported (golint)
    • Line 82: warning: exported method RecordProcessorCheckpointer.PrepareCheckpoint should have comment or be unexported (golint)
    • clientlibrary/metrics/interfaces.go
    • Line 20: warning: package comment should be of the form "Package metrics ..." (golint)
    • Line 32: warning: exported type MonitoringService should have comment or be unexported (golint)
    • Line 49: warning: exported method NoopMonitoringService.Init should have comment or be unexported (golint)
    • Line 50: warning: exported method NoopMonitoringService.Start should have comment or be unexported (golint)
    • Line 51: warning: exported method NoopMonitoringService.Shutdown should have comment or be unexported (golint)
    • Line 53: warning: exported method NoopMonitoringService.IncrRecordsProcessed should have comment or be unexported (golint)
    • Line 54: warning: exported method NoopMonitoringService.IncrBytesProcessed should have comment or be unexported (golint)
    • Line 55: warning: exported method NoopMonitoringService.MillisBehindLatest should have comment or be unexported (golint)
    • Line 56: warning: exported method NoopMonitoringService.LeaseGained should have comment or be unexported (golint)
    • Line 57: warning: exported method NoopMonitoringService.LeaseLost should have comment or be unexported (golint)
    • Line 58: warning: exported method NoopMonitoringService.LeaseRenewed should have comment or be unexported (golint)
    • Line 59: warning: exported method NoopMonitoringService.RecordGetRecordsTime should have comment or be unexported (golint)
    • Line 60: warning: exported method NoopMonitoringService.RecordProcessRecordsTime should have comment or be unexported (golint)
    • 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/interfaces/inputs.go
    • Line 47: warning: comment on exported const REQUESTED should be of the form "REQUESTED ..." (golint)
    • Line 55: warning: comment on exported const TERMINATE should be of the form "TERMINATE ..." (golint)
    • Line 63: warning: comment on exported const ZOMBIE should be of the form "ZOMBIE ..." (golint)
    • Line 71: warning: comment on exported type InitializationInput should be of the form "InitializationInput ..." (with optional leading article) (golint)
    • Line 71: warning: comment on exported type ProcessRecordsInput should be of the form "ProcessRecordsInput ..." (with optional leading article) (golint)
    • Line 71: warning: comment on exported type ShutdownInput should be of the form "ShutdownInput ..." (with optional leading article) (golint)
    • Line 73: warning: comment on exported type ShutdownReason should be of the form "ShutdownReason ..." (with optional leading article) (golint)
    • Line 123: warning: exported function ShutdownReasonMessage should have comment or be unexported (golint)
    • clientlibrary/metrics/cloudwatch/cloudwatch.go
    • Line 20: warning: package comment should be of the form "Package cloudwatch ..." (golint)
    • Line 49: warning: exported type MonitoringService should have comment or be unexported (golint)
    • Line 94: warning: exported method MonitoringService.Init should have comment or be unexported (golint)
    • Line 113: warning: exported method MonitoringService.Start should have comment or be unexported (golint)
    • Line 120: warning: exported method MonitoringService.Shutdown should have comment or be unexported (golint)
    • Line 282: warning: exported method MonitoringService.IncrRecordsProcessed should have comment or be unexported (golint)
    • Line 289: warning: exported method MonitoringService.IncrBytesProcessed should have comment or be unexported (golint)
    • Line 296: warning: exported method MonitoringService.MillisBehindLatest should have comment or be unexported (golint)
    • Line 303: warning: exported method MonitoringService.LeaseGained should have comment or be unexported (golint)
    • Line 310: warning: exported method MonitoringService.LeaseLost should have comment or be unexported (golint)
    • Line 317: warning: exported method MonitoringService.LeaseRenewed should have comment or be unexported (golint)
    • Line 324: warning: exported method MonitoringService.RecordGetRecordsTime should have comment or be unexported (golint)
    • Line 330: warning: exported method MonitoringService.RecordProcessRecordsTime should have comment or be unexported (golint)
    • clientlibrary/metrics/prometheus/prometheus.go
    • Line 20: warning: package comment should be of the form "Package prometheus ..." (golint)
    • Line 69: warning: exported method MonitoringService.Init should have comment or be unexported (golint)
    • Line 122: warning: exported method MonitoringService.Start should have comment or be unexported (golint)
    • Line 136: warning: exported method MonitoringService.Shutdown should have comment or be unexported (golint)
    • Line 138: warning: exported method MonitoringService.IncrRecordsProcessed should have comment or be unexported (golint)
    • Line 142: warning: exported method MonitoringService.IncrBytesProcessed should have comment or be unexported (golint)
    • Line 146: warning: exported method MonitoringService.MillisBehindLatest should have comment or be unexported (golint)
    • Line 150: warning: exported method MonitoringService.LeaseGained should have comment or be unexported (golint)
    • Line 154: warning: exported method MonitoringService.LeaseLost should have comment or be unexported (golint)
    • Line 158: warning: exported method MonitoringService.LeaseRenewed should have comment or be unexported (golint)
    • Line 162: warning: exported method MonitoringService.RecordGetRecordsTime should have comment or be unexported (golint)
    • Line 166: warning: exported method MonitoringService.RecordProcessRecordsTime 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/checkpoint/checkpointer.go
    • Line 20: warning: package comment should be of the form "Package checkpoint ..." (golint)
    • Line 40: warning: exported const LeaseKeyKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported type ErrLeaseNotAcquired should have comment or be unexported (golint)
    • clientlibrary/partition/partition.go
    • Line 20: warning: package comment should be of the form "Package partition ..." (golint)
    • Line 39: warning: exported type ShardStatus should have comment or be unexported (golint)
    • Line 53: warning: exported method ShardStatus.GetLeaseOwner should have comment or be unexported (golint)
    • Line 59: warning: exported method ShardStatus.SetLeaseOwner should have comment or be unexported (golint)
    • Line 65: warning: exported method ShardStatus.GetCheckpoint should have comment or be unexported (golint)
    • Line 71: warning: exported method ShardStatus.SetCheckpoint should have comment or be unexported (golint)
    • Line 77: warning: exported method ShardStatus.GetLeaseTimeout should have comment or be unexported (golint)
    • Line 83: warning: exported method ShardStatus.SetLeaseTimeout should have comment or be unexported (golint)
    • Line 89: warning: exported method ShardStatus.IsClaimRequestExpired should have comment or be unexported (golint)
    • Line 92: 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)

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!


misspell92%

Misspell Finds commonly misspelled English words