Preparing report...

Report for github.com/tywkeene/autobd

A    Great!    Found 13 issues across 15 files

Tweet

gofmt86%

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!


gocyclo100%

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.

No problems detected. Good job!


golint26%

Golint is a linter for Go source code.

    • autobd/version/version.go
    • Line 10: warning: exported var Version should have comment or be unexported (golint)
    • Line 14: warning: exported type VersionInfo should have comment or be unexported (golint)
    • Line 19: warning: exported function Print should have comment or be unexported (golint)
    • Line 23: warning: exported function GetVersion should have comment or be unexported (golint)
    • Line 27: warning: exported function GetCommit should have comment or be unexported (golint)
    • Line 31: warning: exported function GetMajor should have comment or be unexported (golint)
    • Line 35: warning: exported function GetMinor should have comment or be unexported (golint)
    • Line 39: warning: exported function GetPatch should have comment or be unexported (golint)
    • Line 43: warning: exported function JSON should have comment or be unexported (golint)
    • autobd/index/index.go
    • Line 58: warning: exported function NewIndex should have comment or be unexported (golint)
    • Line 94: warning: exported function ValidateDirectory should have comment or be unexported (golint)
    • autobd/connection/connection.go
    • Line 1: warning: package comment should be of the form "Package connection ..." (golint)
    • Line 34: warning: exported method Connection.HandleAPIError should have comment or be unexported (golint)
    • Line 51: warning: exported function NewConnection should have comment or be unexported (golint)
    • Line 66: warning: exported method Connection.SetSynced should have comment or be unexported (golint)
    • Line 80: warning: exported method Connection.SetOnline should have comment or be unexported (golint)
    • Line 94: warning: exported method Connection.ConstructUrl should have comment or be unexported (golint)
    • Line 102: warning: exported method Connection.SetRequestHeaders should have comment or be unexported (golint)
    • Line 108: warning: exported method Connection.ConstructGetRequest should have comment or be unexported (golint)
    • Line 122: warning: exported method Connection.ConstructPostRequest should have comment or be unexported (golint)
    • Line 136: warning: comment on exported function InflateResponse should be of the form "InflateResponse ..." (golint)
    • Line 151: warning: comment on exported method Connection.Get should be of the form "Get ..." (golint)
    • Line 165: warning: exported method Connection.Post should have comment or be unexported (golint)
    • Line 177: warning: exported method Connection.RequestVersion should have comment or be unexported (golint)
    • Line 185: warning: exported method Connection.RequestIndex should have comment or be unexported (golint)
    • Line 192: warning: exported method Connection.RequestSyncDir should have comment or be unexported (golint)
    • Line 216: warning: exported method Connection.RequestSyncFile should have comment or be unexported (golint)
    • Line 228: warning: comment on exported method Connection.IdentifyWithServer should be of the form "IdentifyWithServer ..." (golint)
    • Line 238: warning: comment on exported method Connection.SendHeartbeat should be of the form "SendHeartbeat ..." (golint)
    • Line 247: warning: exported method Connection.GetNodes should have comment or be unexported (golint)
    • autobd/routes/routes.go
    • Line 3: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 36: warning: comment on exported function GzipHandler should be of the form "GzipHandler ..." (golint)
    • Line 52: warning: exported function LogHttp should have comment or be unexported (golint)
    • Line 74: warning: comment on exported function GetQueryValue should be of the form "GetQueryValue ..." (golint)
    • Line 85: warning: comment on exported function ServeIndex should be of the form "ServeIndex ..." (golint)
    • Line 122: warning: comment on exported function ServeServerVer should be of the form "ServeServerVer ..." (golint)
    • Line 138: warning: comment on exported function ServeSync should be of the form "ServeSync ..." (golint)
    • Line 189: warning: comment on exported function ListNodes should be of the form "ListNodes ..." (golint)
    • Line 212: warning: comment on exported function StartHeartBeatTracker should be of the form "StartHeartBeatTracker ..." (golint)
    • Line 226: warning: comment on exported function Identify should be of the form "Identify ..." (golint)
    • Line 282: warning: comment on exported function HeartBeat should be of the form "HeartBeat ..." (golint)
    • Line 316: warning: exported function SetupRoutes should have comment or be unexported (golint)
    • autobd/utils/utils.go
    • Line 15: warning: exported type APIError should have comment or be unexported (golint)
    • Line 20: warning: exported type HttpErrorHandler should have comment or be unexported (golint)
    • Line 27: warning: exported const ErrorActionErr should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported function NewHttpErrorHandle should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method HttpErrorHandler.Handle should be of the form "Handle ..." (golint)
    • Line 66: warning: exported function HandleError should have comment or be unexported (golint)
    • Line 88: warning: exported function WriteFile should have comment or be unexported (golint)
    • Line 98: warning: comment on exported function TimeTrack should be of the form "TimeTrack ..." (golint)
    • autobd/cache/cache.go
    • Line 11: warning: exported function Initialize should have comment or be unexported (golint)
    • Line 26: warning: exported function FindDirectory should have comment or be unexported (golint)
    • Line 40: warning: exported function Get should have comment or be unexported (golint)
    • autobd/packing/packing.go
    • Line 11: warning: exported function UnpackDir should have comment or be unexported (golint)
    • Line 97: warning: exported function PackDir should have comment or be unexported (golint)
    • autobd/options/options.go
    • Line 10: warning: exported type NodeConf should have comment or be unexported (golint)
    • Line 20: warning: exported type Conf should have comment or be unexported (golint)
    • Line 39: warning: exported var Config should have comment or be unexported (golint)
    • Line 41: warning: exported function GetOptions should have comment or be unexported (golint)
    • autobd/node/node.go
    • Line 20: warning: exported type Node should have comment or be unexported (golint)
    • Line 37: warning: exported function InitNode should have comment or be unexported (golint)
    • Line 52: warning: exported method Node.WriteNodeUUID should have comment or be unexported (golint)
    • Line 66: warning: exported method Node.ReadNodeUUID should have comment or be unexported (golint)
    • Line 86: warning: exported method Node.StartHeart should have comment or be unexported (golint)
    • Line 109: warning: exported method Node.CountOnlineServers should have comment or be unexported (golint)
    • Line 119: warning: exported method Node.Identify should have comment or be unexported (golint)
    • Line 146: warning: exported function CompareDirs should have comment or be unexported (golint)
    • Line 173: warning: comment on exported method Node.CompareIndex should be of the form "CompareIndex ..." (golint)
    • Line 196: warning: exported method Node.IsSynced should have comment or be unexported (golint)
    • Line 205: warning: exported method Node.Sync should have comment or be unexported (golint)
    • Line 234: warning: exported method Node.UpdateLoop should have comment or be unexported (golint)
    • autobd/nodelist/nodelist.go
    • Line 14: warning: exported type NodeHeartbeat should have comment or be unexported (golint)
    • Line 19: warning: exported type NodeMetadata should have comment or be unexported (golint)
    • Line 25: warning: exported type Node should have comment or be unexported (golint)
    • Line 33: warning: exported type NodeList should have comment or be unexported (golint)
    • Line 35: warning: comment on exported var CurrentNodes should be of the form "CurrentNodes ..." (golint)
    • Line 41: warning: exported method Node.ShortUUID should have comment or be unexported (golint)
    • Line 45: warning: comment on exported function GetNodeByUUID should be of the form "GetNodeByUUID ..." (golint)
    • Line 55: warning: comment on exported function AddNode should be of the form "AddNode ..." (golint)
    • Line 66: warning: comment on exported function UpdateNodeStatus should be of the form "UpdateNodeStatus ..." (golint)
    • Line 76: warning: comment on exported function ValidateNode should be of the form "ValidateNode ..." (golint)
    • Line 84: warning: exported function ReadNodeList should have comment or be unexported (golint)
    • Line 95: warning: exported function WriteNodeList should have comment or be unexported (golint)
    • Line 109: warning: exported function UpdateNodeList should have comment or be unexported (golint)
    • Line 128: warning: exported function GetNodelistJson should have comment or be unexported (golint)
    • Line 138: warning: exported function InitializeNodeList should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign86%

IneffAssign detects ineffectual assignments in Go code.


misspell93%

Misspell Finds commonly misspelled English words