Preparing report...

Report for github.com/gazette/core

A+    Excellent!    Found 81 issues across 233 files

Tweet

gofmt98%

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!


gocyclo93%

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.

    • core/broker/append_fsm.go
    • Line 451: warning: cyclomatic complexity 26 of function (*appendFSM).onStreamContent() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 17 of function (*appendFSM).onValidatePreconditions() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • core/allocator/allocator_key_space.go
    • Line 29: warning: exported const SepByte should have its own declaration (golint)
    • Line 171: 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 181: 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)
    • core/keyspace/key_values.go
    • Line 129: 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)
    • core/broker/protocol/label_extensions.go
    • Line 115: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 197: warning: comment on exported function SubtractLabelSet should be of the form "SubtractLabelSet ..." (golint)
    • Line 237: warning: receiver name s should be consistent with previous receiver name m for LabelSelector (golint)
    • Line 366: 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 407: 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 413: 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)
    • core/message/uuid.go
    • Line 127: warning: don't use underscores in Go names; const Flag_OUTSIDE_TXN should be FlagOUTSIDETXN (golint)
    • Line 131: warning: don't use underscores in Go names; const Flag_CONTINUE_TXN should be FlagCONTINUETXN (golint)
    • Line 150: warning: don't use underscores in Go names; const Flag_ACK_TXN should be FlagACKTXN (golint)
    • core/allocator/sparse_push_relabel/push_relabel.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 13: warning: comment on exported type NodeID should be of the form "NodeID ..." (with optional leading article) (golint)
    • Line 138: 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 429: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • core/broker/client/reader.go
    • Line 354: warning: comment on exported var ErrNotJournalBroker should be of the form "ErrNotJournalBroker ..." (golint)
    • Line 356: warning: exported var ErrNotJournalPrimaryBroker should have comment or be unexported (golint)
    • core/broker/protocol/dispatcher.go
    • Line 74: warning: exported method NoopDispatchRouter.Route should have comment or be unexported (golint)
    • Line 75: warning: exported method NoopDispatchRouter.UpdateRoute should have comment or be unexported (golint)
    • Line 76: warning: exported method NoopDispatchRouter.IsNoopRouter should have comment or be unexported (golint)
    • core/broker/protocol/fragment_extensions.go
    • Line 164: warning: exported method CompressionCodec.MarshalYAML should have comment or be unexported (golint)
    • Line 168: warning: exported method CompressionCodec.UnmarshalYAML should have comment or be unexported (golint)
    • Line 180: 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)
    • core/consumer/recoverylog/playback.go
    • Line 48: 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 424: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • core/broker/fragment/stores.go
    • Line 89: 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)
    • core/broker/fragment/spool_unix.go
    • Line 19: 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)
    • core/cmd/gazctl/attach_uuids.go
    • Line 76: 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)
    • core/labels/labels.go
    • Line 15: warning: don't use underscores in Go names; const ContentType_CSV should be ContentTypeCSV (golint)
    • Line 18: warning: don't use underscores in Go names; const ContentType_JSONLines should be ContentTypeJSONLines (golint)
    • Line 23: warning: don't use underscores in Go names; const ContentType_ProtoFixed should be ContentTypeProtoFixed (golint)
    • Line 27: warning: don't use underscores in Go names; const ContentType_RecoveryLog should be ContentTypeRecoveryLog (golint)
    • core/broker/protocol/endpoint.go
    • Line 25: 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)
    • core/keyspace/key_space.go
    • Line 78: 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)
    • core/message/csv_framing.go
    • Line 14: warning: comment on exported type CSVFrameable should be of the form "CSVFrameable ..." (with optional leading article) (golint)
    • Line 44: warning: exported method CSVRecord.GetUUID should have comment or be unexported (golint)
    • Line 45: warning: exported method CSVRecord.SetUUID should have comment or be unexported (golint)
    • Line 46: warning: exported method CSVRecord.NewAcknowledgement should have comment or be unexported (golint)
    • core/message/routines.go
    • Line 27: 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)
    • core/consumer/store-sqlite/store.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 190: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • Line 229: 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)
    • core/consumer/recoverylog/recorder_afero.go
    • Line 16: warning: exported method RecordedAferoFS.Create should have comment or be unexported (golint)
    • Line 31: warning: exported method RecordedAferoFS.OpenFile should have comment or be unexported (golint)
    • Line 52: warning: exported method RecordedAferoFS.Remove should have comment or be unexported (golint)
    • Line 60: warning: exported method RecordedAferoFS.RemoveAll should have comment or be unexported (golint)
    • Line 64: warning: exported method RecordedAferoFS.Rename should have comment or be unexported (golint)
    • core/examples/stream-sum/stream_sum.go
    • Line 21: warning: don't use an underscore in package name (golint)
    • Line 80: warning: exported method Chunk.SetUUID should have comment or be unexported (golint)
    • Line 81: warning: exported method Chunk.GetUUID should have comment or be unexported (golint)
    • Line 82: warning: exported method Chunk.NewAcknowledgement should have comment or be unexported (golint)
    • Line 92: warning: exported method Sum.SetUUID should have comment or be unexported (golint)
    • Line 93: warning: exported method Sum.GetUUID should have comment or be unexported (golint)
    • Line 94: warning: exported method Sum.NewAcknowledgement should have comment or be unexported (golint)
    • core/broker/fragment/persister.go
    • Line 37: warning: exported method Persister.SpoolComplete should have comment or be unexported (golint)
    • Line 53: warning: exported method Persister.Finish should have comment or be unexported (golint)
    • Line 65: warning: exported method Persister.Serve should have comment or be unexported (golint)
    • core/examples/word-count/word_count.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 32: warning: exported method NGramCount.GetUUID should have comment or be unexported (golint)
    • Line 33: warning: exported method NGramCount.SetUUID should have comment or be unexported (golint)
    • Line 34: warning: exported method NGramCount.NewAcknowledgement should have comment or be unexported (golint)
    • Line 205: 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)
    • core/allocator/allocator.go
    • Line 18: warning: exported type AllocateArgs should have comment or be unexported (golint)
    • Line 280: 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)
    • core/broker/protocol/rpc_extensions.go
    • Line 264: warning: exported method ListRequest.Validate should have comment or be unexported (golint)
    • Line 284: warning: exported method ListResponse.Validate should have comment or be unexported (golint)
    • Line 301: warning: exported method ListResponse_Journal.Validate should have comment or be unexported (golint)
    • Line 312: warning: exported method ApplyRequest.Validate should have comment or be unexported (golint)
    • Line 321: warning: exported method ApplyRequest_Change.Validate should have comment or be unexported (golint)
    • Line 342: warning: exported method ApplyResponse.Validate should have comment or be unexported (golint)
    • Line 351: warning: exported method FragmentsRequest.Validate should have comment or be unexported (golint)
    • Line 371: warning: exported method FragmentsResponse.Validate should have comment or be unexported (golint)
    • Line 388: warning: exported method FragmentsResponse__Fragment.Validate should have comment or be unexported (golint)
    • Line 397: warning: exported method Status.Validate should have comment or be unexported (golint)
    • core/broker/protocol/journal_spec_extensions.go
    • Line 166: 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 187: 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)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words