Preparing report...

Report for github.com/la5nta/pat

A    Great!    Found 23 issues across 29 files

Tweet

gofmt96%

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!


golint20%

Golint is a linter for Go source code.

    • pat/http.go
    • Line 65: warning: comment on exported function ListenAndServe should be of the form "ListenAndServe ..." (golint)
    • Line 457: warning: exported function ConnectHandler should have comment or be unexported (golint)
    • Line 508: warning: exported type JSONMessage should have comment or be unexported (golint)
    • Line 513: warning: exported method JSONMessage.MarshalJSON should have comment or be unexported (golint)
    • pat/interactive.go
    • Line 20: warning: exported function Interactive should have comment or be unexported (golint)
    • Line 114: warning: exported function PrintHeard should have comment or be unexported (golint)
    • Line 153: warning: exported function PrintQTC should have comment or be unexported (golint)
    • pat/flags.go
    • Line 15: warning: exported var ErrNoCmd should have comment or be unexported (golint)
    • Line 17: warning: exported type Command should have comment or be unexported (golint)
    • Line 30: warning: exported method Command.PrintUsage should have comment or be unexported (golint)
    • pat/main.go
    • Line 37: warning: exported const MethodWinmor should have comment (or a comment on this block) or be unexported (golint)
    • Line 328: warning: exported function InteractiveHandle should have comment or be unexported (golint)
    • Line 499: warning: exported function EditorName should have comment or be unexported (golint)
    • Line 773: warning: exported function CourseFromFloat64 should have comment or be unexported (golint)
    • pat/rmslist.go
    • Line 26: warning: exported type JSONURL should have comment or be unexported (golint)
    • Line 28: warning: exported method JSONURL.MarshalJSON should have comment or be unexported (golint)
    • Line 30: warning: exported type RMS should have comment or be unexported (golint)
    • Line 41: warning: exported method RMS.IsMode should have comment or be unexported (golint)
    • Line 45: warning: exported method RMS.IsBand should have comment or be unexported (golint)
    • Line 106: warning: exported function ReadRMSList should have comment or be unexported (golint)
    • pat/websocket_hub.go
    • Line 37: warning: exported function NewWSHub should have comment or be unexported (golint)
    • Line 43: warning: exported method WSHub.UpdateStatus should have comment or be unexported (golint)
    • Line 44: warning: exported method WSHub.WriteProgress should have comment or be unexported (golint)
    • Line 45: warning: exported method WSHub.WriteNotification should have comment or be unexported (golint)
    • Line 47: warning: exported method WSHub.Prompt should have comment or be unexported (golint)
    • Line 52: warning: exported method WSHub.WriteJSON should have comment or be unexported (golint)
    • Line 58: warning: should omit 2nd value from range; this loop is equivalent to `for c := range ...` (golint)
    • Line 70: warning: exported method WSHub.ClientAddrs should have comment or be unexported (golint)
    • Line 77: warning: should omit 2nd value from range; this loop is equivalent to `for c := range ...` (golint)
    • pat/cfg/config.go
    • Line 10: warning: exported const PlaceholderMycall should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 87: warning: exported type HamlibConfig should have comment or be unexported (golint)
    • Line 103: warning: exported type WinmorConfig should have comment or be unexported (golint)
    • Line 122: warning: exported type ArdopConfig should have comment or be unexported (golint)
    • Line 142: warning: exported type PactorConfig should have comment or be unexported (golint)
    • Line 156: warning: exported type TelnetConfig should have comment or be unexported (golint)
    • Line 164: warning: exported type SerialTNCConfig should have comment or be unexported (golint)
    • Line 175: warning: exported type AX25Config should have comment or be unexported (golint)
    • Line 186: warning: exported type BeaconConfig should have comment or be unexported (golint)
    • Line 197: warning: exported type GPSdConfig should have comment or be unexported (golint)
    • Line 211: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • pat/VERSION.go
    • Line 8: warning: exported var AppName should have comment or be unexported (golint)
    • pat/event_log.go
    • Line 14: warning: exported type EventLogger should have comment or be unexported (golint)
    • Line 19: warning: exported function NewEventLogger should have comment or be unexported (golint)
    • Line 24: warning: exported method EventLogger.Close should have comment or be unexported (golint)
    • Line 26: warning: exported method EventLogger.Log should have comment or be unexported (golint)
    • Line 35: warning: exported method EventLogger.LogConn should have comment or be unexported (golint)
    • pat/read.go
    • Line 95: warning: exported type PrettyAddrSlice should have comment or be unexported (golint)
    • pat/internal/gpsd/objects.go
    • Line 32: warning: exported method TPV.Position should have comment or be unexported (golint)
    • Line 42: warning: exported method TPV.HasFix should have comment or be unexported (golint)
    • pat/internal/cmsapi/api.go
    • Line 20: warning: exported const RootURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported const AccessKey should be of the form "AccessKey ..." (golint)
    • Line 28: warning: exported type VersionAdd should have comment or be unexported (golint)
    • Line 35: warning: exported method VersionAdd.Post should have comment or be unexported (golint)
    • Line 62: warning: exported type GatewayStatus should have comment or be unexported (golint)
    • Line 68: warning: exported type Gateway should have comment or be unexported (golint)
    • Line 80: warning: exported type GatewayChannel should have comment or be unexported (golint)
    • Line 92: warning: exported type RFC1123Time should have comment or be unexported (golint)
    • Line 129: warning: exported function GetGatewayStatusCached should have comment or be unexported (golint)
    • Line 158: warning: exported method RFC1123Time.UnmarshalJSON should have comment or be unexported (golint)
    • pat/freq.go
    • Line 35: warning: exported type Band should have comment or be unexported (golint)
    • Line 37: warning: exported method Band.Contains should have comment or be unexported (golint)
    • Line 44: warning: exported type Frequency should have comment or be unexported (golint)
    • Line 53: warning: exported method Frequency.MarshalJSON should have comment or be unexported (golint)
    • Line 66: warning: exported method Frequency.KHz should have comment or be unexported (golint)
    • Line 68: warning: exported method Frequency.Dial should have comment or be unexported (golint)
    • Line 94: warning: exported function VFOForTransport should have comment or be unexported (golint)
    • pat/exchange.go
    • Line 48: warning: exported type NotifyMBox should have comment or be unexported (golint)
    • Line 50: warning: exported method NotifyMBox.ProcessInbound should have comment or be unexported (golint)
    • Line 221: warning: exported type StatusUpdate should have comment or be unexported (golint)
    • Line 223: warning: exported method StatusUpdate.UpdateStatus should have comment or be unexported (golint)
    • pat/listen.go
    • Line 17: warning: exported function Unlisten should have comment or be unexported (golint)
    • Line 29: warning: exported function Listen should have comment or be unexported (golint)
    • Line 51: warning: exported type AX25Listener should have comment or be unexported (golint)
    • Line 53: warning: exported method AX25Listener.Init should have comment or be unexported (golint)
    • Line 57: warning: exported method AX25Listener.BeaconStart should have comment or be unexported (golint)
    • Line 64: warning: exported method AX25Listener.BeaconStop should have comment or be unexported (golint)
    • Line 96: warning: exported method AX25Listener.CurrentFreq should have comment or be unexported (golint)
    • Line 97: warning: exported method AX25Listener.Name should have comment or be unexported (golint)
    • Line 99: warning: exported type ARDOPListener should have comment or be unexported (golint)
    • Line 101: warning: exported method ARDOPListener.Name should have comment or be unexported (golint)
    • Line 102: warning: exported method ARDOPListener.Init should have comment or be unexported (golint)
    • Line 113: warning: exported method ARDOPListener.CurrentFreq should have comment or be unexported (golint)
    • Line 121: warning: exported method ARDOPListener.BeaconStart should have comment or be unexported (golint)
    • Line 125: warning: exported method ARDOPListener.BeaconStop should have comment or be unexported (golint)
    • Line 127: warning: exported type WINMORListener should have comment or be unexported (golint)
    • Line 129: warning: exported method WINMORListener.Name should have comment or be unexported (golint)
    • Line 130: warning: exported method WINMORListener.Init should have comment or be unexported (golint)
    • Line 137: warning: exported method WINMORListener.CurrentFreq should have comment or be unexported (golint)
    • Line 145: warning: exported type TelnetListener should have comment or be unexported (golint)
    • Line 147: warning: exported method TelnetListener.Name should have comment or be unexported (golint)
    • Line 148: warning: exported method TelnetListener.Init should have comment or be unexported (golint)
    • Line 149: warning: exported method TelnetListener.CurrentFreq should have comment or be unexported (golint)
    • pat/listener_hub.go
    • Line 14: warning: exported type TransportListener should have comment or be unexported (golint)
    • Line 20: warning: exported type Beaconer should have comment or be unexported (golint)
    • Line 25: warning: exported type Listener should have comment or be unexported (golint)
    • Line 35: warning: exported function NewListener should have comment or be unexported (golint)
    • Line 37: warning: exported method Listener.Err should have comment or be unexported (golint)
    • Line 43: warning: exported method Listener.Close should have comment or be unexported (golint)
    • Line 102: warning: exported type RemoteCaller should have comment or be unexported (golint)
    • Line 132: warning: exported type ListenerHub should have comment or be unexported (golint)
    • Line 137: warning: exported function NewListenerHub should have comment or be unexported (golint)
    • Line 143: warning: exported method ListenerHub.Active should have comment or be unexported (golint)
    • Line 157: warning: exported method ListenerHub.Enable should have comment or be unexported (golint)
    • Line 171: warning: exported method ListenerHub.Disable should have comment or be unexported (golint)
    • Line 185: warning: exported method ListenerHub.Close should have comment or be unexported (golint)
    • pat/prompt_hub.go
    • Line 12: warning: exported type Prompt should have comment or be unexported (golint)
    • Line 21: warning: exported type PromptResponse should have comment or be unexported (golint)
    • Line 27: warning: exported type PromptHub should have comment or be unexported (golint)
    • Line 34: warning: exported function NewPromptHub should have comment or be unexported (golint)
    • Line 36: warning: exported method PromptHub.OmitTerminal should have comment or be unexported (golint)
    • Line 60: warning: exported method PromptHub.Respond should have comment or be unexported (golint)
    • Line 67: warning: exported method PromptHub.Prompt should have comment or be unexported (golint)
    • Line 86: warning: exported type ReadAborter should have comment or be unexported (golint)
    • pat/usage.go
    • Line 8: warning: exported var UsageConnect should have comment or be unexported (golint)
    • Line 49: warning: exported var ExamplePosition should have comment or be unexported (golint)
    • pat/internal/gpsd/gpsd.go
    • Line 14: warning: exported type NMEAMode should have comment or be unexported (golint)
    • Line 17: warning: exported const ModeUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported var ErrUnsupportedProtocolVersion should have comment or be unexported (golint)
    • Line 25: warning: comment on exported type Positioner should be of the form "Positioner ..." (with optional leading article) (golint)
    • Line 161: warning: exported var ErrTimeout should have comment or be unexported (golint)
    • pat/config.go
    • Line 18: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 74: warning: exported function ReadConfig should have comment or be unexported (golint)
    • Line 93: warning: exported function WriteConfig should have comment or be unexported (golint)
    • pat/connect.go
    • Line 41: warning: exported function Connect should have comment or be unexported (golint)
    • Line 67: warning: don't use underscores in Go names; var pt_cmdinit should be ptCmdinit (golint)
    • Line 226: 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 272: 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)
    • pat/utils.go
    • Line 9: warning: exported function SplitFunc should have comment or be unexported (golint)

gocyclo89%

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.

    • pat/connect.go
    • Line 41: warning: cyclomatic complexity 28 of function Connect() is high (> 15) (gocyclo)
    • pat/main.go
    • Line 518: warning: cyclomatic complexity 27 of function composeMessage() is high (> 15) (gocyclo)
    • Line 216: warning: cyclomatic complexity 19 of function main() is high (> 15) (gocyclo)
    • pat/http.go
    • Line 196: warning: cyclomatic complexity 20 of function postOutboundMessageHandler() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!