Preparing report...

Report for github.com/nats-io/nats-server

A+    Excellent!    Found 47 issues across 146 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!


golint75%

Golint is a linter for Go source code.

    • nats-server/server/dirstore_test.go
    • Line 33: warning: don't use underscores in Go names; func require_True should be requireTrue (golint)
    • Line 40: warning: don't use underscores in Go names; func require_False should be requireFalse (golint)
    • Line 47: warning: don't use underscores in Go names; func require_NoError should be requireNoError (golint)
    • Line 54: warning: don't use underscores in Go names; func require_Contains should be requireContains (golint)
    • Line 63: warning: don't use underscores in Go names; func require_Error should be requireError (golint)
    • Line 70: warning: don't use underscores in Go names; func require_Equal should be requireEqual (golint)
    • Line 77: warning: don't use underscores in Go names; func require_NotEqual should be requireNotEqual (golint)
    • Line 84: warning: don't use underscores in Go names; func require_Len should be requireLen (golint)
    • Line 806: warning: don't use underscores in Go names; var require_OneJWT should be requireOneJWT (golint)
    • Line 869: warning: don't use underscores in Go names; var require_OneJWT should be requireOneJWT (golint)
    • nats-server/server/client.go
    • Line 173: warning: exported const ClientClosed should have comment (or a comment on this block) or be unexported (golint)
    • Line 525: warning: exported type ClientOpts should have comment or be unexported (golint)
    • nats-server/server/consumer.go
    • Line 35: warning: exported type ConsumerInfo should have comment or be unexported (golint)
    • Line 50: warning: exported type ConsumerConfig should have comment or be unexported (golint)
    • Line 81: warning: exported type CreateConsumerRequest should have comment or be unexported (golint)
    • Line 165: warning: comment on exported const OK should be of the form "OK ..." (golint)
    • Line 472: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 478: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • nats-server/server/parser.go
    • Line 66: warning: don't use underscores in Go names; const OP_C should be OPC (golint)
    • Line 74: warning: don't use underscores in Go names; const OP_H should be OPH (golint)
    • Line 85: warning: don't use underscores in Go names; const OP_P should be OPP (golint)
    • Line 99: warning: don't use underscores in Go names; const OP_S should be OPS (golint)
    • Line 104: warning: don't use underscores in Go names; const OP_A should be OPA (golint)
    • Line 111: warning: don't use underscores in Go names; const OP_L should be OPL (golint)
    • Line 113: warning: don't use underscores in Go names; const OP_R should be OPR (golint)
    • Line 115: warning: don't use underscores in Go names; const OP_U should be OPU (golint)
    • Line 122: warning: don't use underscores in Go names; const OP_M should be OPM (golint)
    • Line 127: warning: don't use underscores in Go names; const OP_I should be OPI (golint)
    • Line 1240: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1246: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1252: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • nats-server/server/raft.go
    • Line 36: warning: exported type RaftNode should have comment or be unexported (golint)
    • Line 71: warning: exported type WAL should have comment or be unexported (golint)
    • Line 85: warning: exported type LeadChange should have comment or be unexported (golint)
    • Line 90: warning: exported type Peer should have comment or be unexported (golint)
    • Line 97: warning: exported type RaftState should have comment or be unexported (golint)
    • Line 229: warning: exported type RaftConfig should have comment or be unexported (golint)
    • Line 1377: 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 1493: warning: comment on exported type CommittedEntry should be of the form "CommittedEntry ..." (with optional leading article) (golint)
    • Line 1512: warning: exported type EntryType should have comment or be unexported (golint)
    • Line 1515: warning: exported const EntryNormal should have comment (or a comment on this block) or be unexported (golint)
    • Line 1544: warning: exported type Entry should have comment or be unexported (golint)
    • Line 1987: 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 2308: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 2616: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • nats-server/server/server.go
    • Line 503: warning: comment on exported method Server.ClusterName should be of the form "ClusterName ..." (golint)
    • Line 890: warning: comment on exported method Server.ActivePeers should be of the form "ActivePeers ..." (golint)
    • Line 1007: warning: comment on exported method Server.Running should be of the form "Running ..." (golint)
    • nats-server/server/accounts.go
    • Line 121: warning: exported const ClientInfoHdr should have comment or be unexported (golint)
    • Line 537: warning: exported function NewMapDest should have comment or be unexported (golint)
    • Line 561: warning: comment on exported method Account.AddWeightedMappings should be of the form "AddWeightedMappings ..." (golint)
    • Line 1336: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1402: warning: exported const MaxAccountCycleSearchDepth should have comment or be unexported (golint)
    • Line 1519: warning: comment on exported method Account.NumPendingResponses should be of the form "NumPendingResponses ..." (golint)
    • Line 1804: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 2022: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 2853: warning: comment on exported method Server.UpdateAccountClaims should be of the form "UpdateAccountClaims ..." (golint)
    • Line 3441: warning: exported method MemAccResolver.IsReadOnly should have comment or be unexported (golint)
    • Line 3490: warning: comment on exported type DirAccResolver should be of the form "DirAccResolver ..." (with optional leading article) (golint)
    • Line 3498: warning: exported method DirAccResolver.IsTrackingUpdate should have comment or be unexported (golint)
    • Line 3502: warning: exported method DirAccResolver.Reload should have comment or be unexported (golint)
    • Line 3666: warning: exported method DirAccResolver.Start should have comment or be unexported (golint)
    • Line 3820: warning: exported method DirAccResolver.Fetch should have comment or be unexported (golint)
    • Line 3823: 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 3835: warning: exported method DirAccResolver.Store should have comment or be unexported (golint)
    • Line 3839: warning: exported type DirResOption should have comment or be unexported (golint)
    • Line 3841: warning: comment on exported function FetchTimeout should be of the form "FetchTimeout ..." (golint)
    • Line 3861: warning: exported function NewDirAccResolver should have comment or be unexported (golint)
    • Line 3884: warning: comment on exported type CacheDirAccResolver should be of the form "CacheDirAccResolver ..." (with optional leading article) (golint)
    • Line 3938: warning: exported function NewCacheDirAccResolver should have comment or be unexported (golint)
    • Line 3953: warning: exported method CacheDirAccResolver.Start should have comment or be unexported (golint)
    • Line 4040: warning: exported method CacheDirAccResolver.Reload should have comment or be unexported (golint)
    • nats-server/server/jetstream_api.go
    • Line 258: warning: comment on exported const JSMaxDescriptionLen should be of the form "JSMaxDescriptionLen ..." (golint)
    • Line 281: warning: exported const JSApiOverloadedType should have comment or be unexported (golint)
    • Line 301: warning: exported const JSApiAccountInfoResponseType should have comment or be unexported (golint)
    • Line 309: warning: exported const JSApiStreamCreateResponseType should have comment or be unexported (golint)
    • Line 317: warning: exported const JSApiStreamDeleteResponseType should have comment or be unexported (golint)
    • Line 319: warning: exported type JSApiStreamInfoRequest should have comment or be unexported (golint)
    • Line 323: warning: exported type JSApiStreamInfoResponse should have comment or be unexported (golint)
    • Line 328: warning: exported const JSApiStreamInfoResponseType should have comment or be unexported (golint)
    • Line 333: warning: exported const JSApiListLimit should have comment or be unexported (golint)
    • Line 335: warning: exported type JSApiStreamNamesRequest should have comment or be unexported (golint)
    • Line 349: warning: exported const JSApiStreamNamesResponseType should have comment or be unexported (golint)
    • Line 359: warning: exported const JSApiStreamListResponseType should have comment or be unexported (golint)
    • Line 375: warning: exported type JSApiStreamPurgeResponse should have comment or be unexported (golint)
    • Line 381: warning: exported const JSApiStreamPurgeResponseType should have comment or be unexported (golint)
    • Line 389: warning: exported const JSApiStreamUpdateResponseType should have comment or be unexported (golint)
    • Line 397: warning: exported type JSApiMsgDeleteResponse should have comment or be unexported (golint)
    • Line 402: warning: exported const JSApiMsgDeleteResponseType should have comment or be unexported (golint)
    • Line 404: warning: exported type JSApiStreamSnapshotRequest should have comment or be unexported (golint)
    • Line 425: warning: exported const JSApiStreamSnapshotResponseType should have comment or be unexported (golint)
    • Line 442: warning: exported const JSApiStreamRestoreResponseType should have comment or be unexported (golint)
    • Line 456: warning: exported const JSApiStreamRemovePeerResponseType should have comment or be unexported (golint)
    • Line 464: warning: exported const JSApiStreamLeaderStepDownResponseType should have comment or be unexported (golint)
    • Line 472: warning: exported const JSApiConsumerLeaderStepDownResponseType should have comment or be unexported (golint)
    • Line 485: warning: exported const JSApiLeaderStepDownResponseType should have comment or be unexported (golint)
    • Line 499: warning: exported const JSApiMetaServerRemoveResponseType should have comment or be unexported (golint)
    • Line 507: warning: exported type JSApiMsgGetResponse should have comment or be unexported (golint)
    • Line 512: warning: exported const JSApiMsgGetResponseType should have comment or be unexported (golint)
    • Line 517: warning: exported type JSApiConsumerCreateResponse should have comment or be unexported (golint)
    • Line 522: warning: exported const JSApiConsumerCreateResponseType should have comment or be unexported (golint)
    • Line 524: warning: exported type JSApiConsumerDeleteResponse should have comment or be unexported (golint)
    • Line 529: warning: exported const JSApiConsumerDeleteResponseType should have comment or be unexported (golint)
    • Line 531: warning: exported type JSApiConsumerInfoResponse should have comment or be unexported (golint)
    • Line 536: warning: exported const JSApiConsumerInfoResponseType should have comment or be unexported (golint)
    • Line 538: warning: exported type JSApiConsumersRequest should have comment or be unexported (golint)
    • Line 542: warning: exported type JSApiConsumerNamesResponse should have comment or be unexported (golint)
    • Line 548: warning: exported const JSApiConsumerNamesResponseType should have comment or be unexported (golint)
    • Line 550: warning: exported type JSApiConsumerListResponse should have comment or be unexported (golint)
    • Line 556: warning: exported const JSApiConsumerListResponseType should have comment or be unexported (golint)
    • Line 571: warning: exported const JSApiStreamTemplateCreateResponseType should have comment or be unexported (golint)
    • Line 573: warning: exported type JSApiStreamTemplateDeleteResponse should have comment or be unexported (golint)
    • Line 578: warning: exported const JSApiStreamTemplateDeleteResponseType should have comment or be unexported (golint)
    • Line 586: warning: exported const JSApiStreamTemplateInfoResponseType should have comment or be unexported (golint)
    • Line 588: warning: exported type JSApiStreamTemplatesRequest should have comment or be unexported (golint)
    • Line 599: warning: exported const JSApiStreamTemplateNamesResponseType should have comment or be unexported (golint)
    • nats-server/server/jetstream.go
    • Line 51: warning: exported type JetStreamStats should have comment or be unexported (golint)
    • Line 58: warning: exported type JetStreamAccountLimits should have comment or be unexported (golint)
    • Line 76: warning: exported type JetStreamAPIStats should have comment or be unexported (golint)
    • Line 854: warning: exported method Server.StoreDir should have comment or be unexported (golint)
    • Line 1769: warning: comment on exported type StreamTemplateInfo should be of the form "StreamTemplateInfo ..." (with optional leading article) (golint)
    • nats-server/server/jetstream_events.go
    • Line 50: warning: exported const JSAPIAuditType should have comment or be unexported (golint)
    • Line 56: warning: exported const CreateEvent should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported const JSStreamActionAdvisoryType should have comment or be unexported (golint)
    • Line 81: warning: exported const JSConsumerActionAdvisoryType should have comment or be unexported (golint)
    • nats-server/conf/parse.go
    • Line 402: 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)
    • nats-server/server/jetstream_cluster.go
    • Line 54: warning: comment on exported type Placement should be of the form "Placement ..." (with optional leading article) (golint)
    • Line 174: warning: exported method Server.JetStreamIsClustered should have comment or be unexported (golint)
    • Line 185: warning: exported method Server.JetStreamIsLeader should have comment or be unexported (golint)
    • Line 195: warning: exported method Server.JetStreamIsCurrent should have comment or be unexported (golint)
    • Line 205: warning: exported method Server.JetStreamSnapshotMeta should have comment or be unexported (golint)
    • Line 223: warning: exported method Server.JetStreamStepdownStream should have comment or be unexported (golint)
    • Line 249: warning: exported method Server.JetStreamSnapshotStream should have comment or be unexported (golint)
    • Line 279: warning: exported method Server.JetStreamClusterPeers should have comment or be unexported (golint)
    • Line 383: warning: exported method Server.JetStreamIsStreamLeader should have comment or be unexported (golint)
    • Line 393: warning: exported method Account.JetStreamIsStreamLeader should have comment or be unexported (golint)
    • Line 403: warning: exported method Server.JetStreamIsStreamCurrent should have comment or be unexported (golint)
    • Line 413: warning: exported method Account.JetStreamIsConsumerLeader should have comment or be unexported (golint)
    • Line 423: warning: exported method Server.JetStreamIsConsumerLeader should have comment or be unexported (golint)
    • Line 593: warning: exported method Server.JetStreamIsStreamAssigned should have comment or be unexported (golint)
    • Line 3538: 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)
    • nats-server/server/const.go
    • Line 203: warning: comment on exported const DEFAULT_SYSTEM_ACCOUNT should be of the form "DEFAULT_SYSTEM_ACCOUNT ..." (golint)
    • Line 206: warning: comment on exported const DEFAULT_GLOBAL_ACCOUNT should be of the form "DEFAULT_GLOBAL_ACCOUNT ..." (golint)
    • Line 209: warning: comment on exported const DEFAULT_ACCOUNT_FETCH_TIMEOUT should be of the form "DEFAULT_ACCOUNT_FETCH_TIMEOUT ..." (golint)
    • nats-server/server/events.go
    • Line 148: warning: exported const AccountNumConnsMsgType should have comment or be unexported (golint)
    • Line 707: warning: comment on exported method Server.Node should be of the form "Node ..." (golint)
    • Line 825: 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 835: 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 847: 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 866: 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 877: 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 888: 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 1213: warning: comment on exported type EventFilterOptions should be of the form "EventFilterOptions ..." (with optional leading article) (golint)
    • Line 1228: warning: comment on exported type AccInfoEventOptions should be of the form "AccInfoEventOptions ..." (with optional leading article) (golint)
    • Line 1234: warning: comment on exported type ConnzEventOptions should be of the form "ConnzEventOptions ..." (with optional leading article) (golint)
    • Line 1240: warning: comment on exported type RoutezEventOptions should be of the form "RoutezEventOptions ..." (with optional leading article) (golint)
    • Line 1246: warning: comment on exported type SubszEventOptions should be of the form "SubszEventOptions ..." (with optional leading article) (golint)
    • Line 1252: warning: comment on exported type VarzEventOptions should be of the form "VarzEventOptions ..." (with optional leading article) (golint)
    • Line 1258: warning: comment on exported type GatewayzEventOptions should be of the form "GatewayzEventOptions ..." (with optional leading article) (golint)
    • Line 1264: warning: comment on exported type LeafzEventOptions should be of the form "LeafzEventOptions ..." (with optional leading article) (golint)
    • Line 1270: warning: comment on exported type AccountzEventOptions should be of the form "AccountzEventOptions ..." (with optional leading article) (golint)
    • Line 1276: warning: comment on exported type JszEventOptions should be of the form "JszEventOptions ..." (with optional leading article) (golint)
    • nats-server/server/monitor.go
    • Line 1177: warning: comment on exported type DenyRules should be of the form "DenyRules ..." (with optional leading article) (golint)
    • Line 2095: warning: exported type ExtImport should have comment or be unexported (golint)
    • Line 2105: warning: exported type ExtExport should have comment or be unexported (golint)
    • Line 2110: warning: exported type ExtVrIssues should have comment or be unexported (golint)
    • Line 2116: warning: exported type ExtMap should have comment or be unexported (golint)
    • Line 2118: warning: exported type AccountInfo should have comment or be unexported (golint)
    • Line 2143: warning: exported type Accountz should have comment or be unexported (golint)
    • Line 2168: warning: exported method Server.Accountz should have comment or be unexported (golint)
    • Line 2220: 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 2363: warning: exported type StreamDetail should have comment or be unexported (golint)
    • Line 2371: warning: exported type AccountDetail should have comment or be unexported (golint)
    • Line 2378: warning: comment on exported type JSInfo should be of the form "JSInfo ..." (with optional leading article) (golint)
    • Line 2453: warning: exported method Server.JszAccount should have comment or be unexported (golint)
    • Line 2593: warning: comment on exported method Server.HandleJsz should be of the form "HandleJsz ..." (golint)
    • nats-server/server/route.go
    • Line 1613: 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)
    • nats-server/server/sublist.go
    • Line 151: warning: exported method Sublist.RegisterQueueNotification should have comment or be unexported (golint)
    • Line 225: warning: exported method Sublist.ClearNotification should have comment or be unexported (golint)
    • Line 229: warning: exported method Sublist.ClearQueueNotification should have comment or be unexported (golint)
    • Line 1461: warning: comment on exported method Sublist.ReverseMatch should be of the form "ReverseMatch ..." (golint)
    • nats-server/server/dirstore.go
    • Line 107: warning: comment on exported function NewImmutableDirJWTStore should be of the form "NewImmutableDirJWTStore ..." (golint)
    • Line 118: warning: comment on exported function NewDirJWTStore should be of the form "NewDirJWTStore ..." (golint)
    • Line 135: warning: exported const NoDelete should have comment (or a comment on this block) or be unexported (golint)
    • Line 140: warning: comment on exported function NewExpiringDirJWTStore should be of the form "NewExpiringDirJWTStore ..." (golint)
    • Line 192: warning: exported method DirJWTStore.IsReadOnly should have comment or be unexported (golint)
    • Line 196: warning: exported method DirJWTStore.LoadAcc should have comment or be unexported (golint)
    • Line 200: warning: exported method DirJWTStore.SaveAcc should have comment or be unexported (golint)
    • Line 204: warning: exported method DirJWTStore.LoadAct should have comment or be unexported (golint)
    • Line 208: warning: exported method DirJWTStore.SaveAct should have comment or be unexported (golint)
    • Line 212: warning: exported method DirJWTStore.Close should have comment or be unexported (golint)
    • Line 260: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 265: warning: comment on exported method DirJWTStore.PackWalk should be of the form "PackWalk ..." (golint)
    • Line 331: warning: exported method DirJWTStore.Reload should have comment or be unexported (golint)
    • Line 377: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 422: 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 537: warning: comment on exported method DirJWTStore.Hash should be of the form "Hash ..." (golint)
    • Line 543: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 603: warning: receiver name pq should be consistent with previous receiver name q for expirationTracker (golint)
    • Line 617: warning: receiver name pq should be consistent with previous receiver name q for expirationTracker (golint)
    • Line 625: warning: receiver name pq should be consistent with previous receiver name q for expirationTracker (golint)
    • Line 654: warning: receiver name pq should be consistent with previous receiver name q for expirationTracker (golint)
    • nats-server/server/opts.go
    • Line 56: warning: comment on exported type PinnedCertSet should be of the form "PinnedCertSet ..." (with optional leading article) (golint)
    • Line 1015: 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 1270: 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)
    • nats-server/server/store.go
    • Line 29: warning: comment on exported const FileStorage should be of the form "FileStorage ..." (golint)
    • Line 33: warning: comment on exported const AnyStorage should be of the form "AnyStorage ..." (golint)
    • Line 65: warning: comment on exported type StorageUpdateHandler should be of the form "StorageUpdateHandler ..." (with optional leading article) (golint)
    • Line 69: warning: exported type StreamStore should have comment or be unexported (golint)
    • Line 109: warning: comment on exported type DiscardPolicy should be of the form "DiscardPolicy ..." (with optional leading article) (golint)
    • Line 184: warning: comment on exported type Pending should be of the form "Pending ..." (with optional leading article) (golint)
    • Line 220: warning: exported method RetentionPolicy.MarshalJSON should have comment or be unexported (golint)
    • Line 233: warning: exported method RetentionPolicy.UnmarshalJSON should have comment or be unexported (golint)
    • Line 258: warning: exported method DiscardPolicy.MarshalJSON should have comment or be unexported (golint)
    • Line 269: warning: exported method DiscardPolicy.UnmarshalJSON should have comment or be unexported (golint)
    • Line 300: warning: exported method StorageType.MarshalJSON should have comment or be unexported (golint)
    • Line 313: warning: exported method StorageType.UnmarshalJSON should have comment or be unexported (golint)
    • Line 333: warning: exported method AckPolicy.MarshalJSON should have comment or be unexported (golint)
    • Line 346: warning: exported method AckPolicy.UnmarshalJSON should have comment or be unexported (golint)
    • Line 365: warning: exported method ReplayPolicy.MarshalJSON should have comment or be unexported (golint)
    • Line 376: warning: exported method ReplayPolicy.UnmarshalJSON should have comment or be unexported (golint)
    • Line 398: warning: exported method DeliverPolicy.UnmarshalJSON should have comment or be unexported (golint)
    • Line 419: warning: exported method DeliverPolicy.MarshalJSON should have comment or be unexported (golint)
    • nats-server/server/stream.go
    • Line 279: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1088: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1382: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • nats-server/server/jetstream_cluster_test.go
    • Line 2448: 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 5828: warning: don't use underscores in Go names; var max_mem should be maxMem (golint)
    • Line 5862: warning: don't use underscores in Go names; var max_disk should be maxDisk (golint)
    • nats-server/server/log.go
    • Line 91: warning: comment on exported method Server.Logger should be of the form "Logger ..." (golint)
    • Line 103: warning: comment on exported method Server.SetLoggerV2 should be of the form "SetLoggerV2 ..." (golint)
    • Line 179: warning: comment on exported method Server.Errors should be of the form "Errors ..." (golint)
    • Line 186: warning: comment on exported method Server.Errorc should be of the form "Errorc ..." (golint)
    • Line 193: warning: comment on exported method Server.Errorsc should be of the form "Errorsc ..." (golint)
    • nats-server/server/filestore.go
    • Line 46: warning: exported type FileStoreConfig should have comment or be unexported (golint)
    • Line 65: warning: comment on exported type FileConsumerInfo should be of the form "FileConsumerInfo ..." (with optional leading article) (golint)
    • Line 209: warning: comment on exported const JetStreamMetaFile should be of the form "JetStreamMetaFile ..." (golint)
    • Line 211: warning: exported const JetStreamMetaFileSum should have comment (or a comment on this block) or be unexported (golint)
    • Line 344: warning: don't use underscores in Go names; var new_cfg should be newCfg (golint)
    • Line 345: warning: don't use underscores in Go names; var old_cfg should be oldCfg (golint)
    • Line 392: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 5033: warning: receiver name cfs should be consistent with previous receiver name o for consumerFileStore (golint)
    • nats-server/server/jwt_test.go
    • Line 3270: warning: don't use underscores in Go names; var require_NextMsg should be requireNextMsg (golint)
    • Line 3305: warning: don't use underscores in Go names; func require_JWTAbsent should be requireJWTAbsent (golint)
    • Line 3312: warning: don't use underscores in Go names; func require_JWTPresent should be requireJWTPresent (golint)
    • Line 3318: warning: don't use underscores in Go names; func require_JWTEqual should be requireJWTEqual (golint)
    • Line 3372: warning: don't use underscores in Go names; var require_NoLocalOrRemoteConnections should be requireNoLocalOrRemoteConnections (golint)
    • Line 3382: warning: don't use underscores in Go names; var require_1Connection should be require1Connection (golint)
    • Line 3396: warning: don't use underscores in Go names; var require_2Connection should be require2Connection (golint)
    • Line 4215: warning: don't use underscores in Go names; var require_IdenticalLimits should be requireIdenticalLimits (golint)
    • Line 4222: warning: don't use underscores in Go names; var expect_JSDisabledForAccount should be expectJSDisabledForAccount (golint)
    • Line 4228: warning: don't use underscores in Go names; var expect_InfoError should be expectInfoError (golint)
    • Line 4239: warning: don't use underscores in Go names; var validate_limits should be validateLimits (golint)
    • nats-server/server/ocsp.go
    • Line 41: warning: exported type OCSPMode should have comment or be unexported (golint)
    • Line 482: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 506: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 595: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 615: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 632: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)

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.

    • nats-server/test/routes_test.go
    • Line 826: warning: cyclomatic complexity 54 of function TestRouteBasicPermissions() is high (> 15) (gocyclo)
    • Line 551: warning: cyclomatic complexity 23 of function TestRouteSendAsyncINFOToClients() is high (> 15) (gocyclo)
    • nats-server/test/monitor_test.go
    • Line 246: warning: cyclomatic complexity 28 of function TestConnz() is high (> 15) (gocyclo)
    • Line 349: warning: cyclomatic complexity 26 of function TestTLSConnz() is high (> 15) (gocyclo)
    • Line 544: warning: cyclomatic complexity 23 of function TestConnzWithAccounts() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 18 of function TestVarz() is high (> 15) (gocyclo)
    • nats-server/test/leafnode_test.go
    • Line 2110: warning: cyclomatic complexity 22 of function TestLeafNodeInfoURLs() is high (> 15) (gocyclo)
    • Line 1939: warning: cyclomatic complexity 19 of function TestLeafNodeExportImportComplexSetup() is high (> 15) (gocyclo)
    • Line 1594: warning: cyclomatic complexity 18 of function TestLeafNodeOperatorAndPermissions() is high (> 15) (gocyclo)
    • nats-server/test/norace_test.go
    • Line 42: warning: cyclomatic complexity 21 of function TestNoRaceRouteSendSubs() is high (> 15) (gocyclo)
    • Line 435: warning: cyclomatic complexity 16 of function TestNoRaceClusterLeaksSubscriptions() is high (> 15) (gocyclo)
    • nats-server/test/ocsp_test.go
    • Line 673: warning: cyclomatic complexity 28 of function TestOCSPReloadRotateTLSCertDisableMustStaple() is high (> 15) (gocyclo)
    • Line 1800: warning: cyclomatic complexity 19 of function TestOCSPCustomConfig() is high (> 15) (gocyclo)
    • Line 1247: warning: cyclomatic complexity 17 of function TestOCSPLeaf() is high (> 15) (gocyclo)
    • nats-server/test/tls_test.go
    • Line 379: warning: cyclomatic complexity 27 of function TestTLSClientCertificateTLSAuthMultipleOptions() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 27 of function TestTLSClientCertificateSANsBasedAuth() is high (> 15) (gocyclo)
    • Line 659: warning: cyclomatic complexity 19 of function TestTLSGatewaysCertificateCNBasedAuth() is high (> 15) (gocyclo)
    • Line 542: warning: cyclomatic complexity 16 of function TestTLSRoutesCertificateCNBasedAuth() is high (> 15) (gocyclo)

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!