Preparing report...

Report for github.com/mendersoftware/mender-cli

A    Great!    Found 19 issues across 21 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!


gocyclo76%

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.

    • mender-cli/cmd/terminal.go
    • Line 313: warning: cyclomatic complexity 20 of function (*TerminalCmd).Run() is high (> 15) (gocyclo)
    • Line 506: warning: cyclomatic complexity 18 of function (*TerminalCmd).pipeStdout() is high (> 15) (gocyclo)
    • mender-cli/cmd/portforward.go
    • Line 193: warning: cyclomatic complexity 17 of function (*PortForwardCmd).Run() is high (> 15) (gocyclo)
    • Line 97: warning: cyclomatic complexity 16 of function getPortMappings() is high (> 15) (gocyclo)

golint9%

Golint is a linter for Go source code.

    • mender-cli/client/useradm/client.go
    • Line 1: warning: package comment should be of the form "Package useradm ..." (golint)
    • Line 36: warning: exported type Client should have comment or be unexported (golint)
    • Line 42: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 50: warning: exported method Client.Login should have comment or be unexported (golint)
    • mender-cli/client/deviceconnect/client.go
    • Line 1: warning: package comment should be of the form "Package deviceconnect ..." (golint)
    • Line 61: warning: exported type Client should have comment or be unexported (golint)
    • Line 71: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 187: warning: exported function NewFileTransferClient should have comment or be unexported (golint)
    • Line 195: warning: exported type DeviceSpec should have comment or be unexported (golint)
    • Line 200: warning: exported type DeviceConnectError should have comment or be unexported (golint)
    • Line 215: warning: exported function NewDeviceConnectError should have comment or be unexported (golint)
    • Line 229: warning: exported method Client.Upload should have comment or be unexported (golint)
    • Line 294: warning: exported method Client.Download should have comment or be unexported (golint)
    • mender-cli/log/log.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 25: warning: exported function Setup should have comment or be unexported (golint)
    • Line 29: warning: exported function Err should have comment or be unexported (golint)
    • Line 33: warning: exported function Errf should have comment or be unexported (golint)
    • Line 37: warning: exported function Verb should have comment or be unexported (golint)
    • Line 43: warning: exported function Verbf should have comment or be unexported (golint)
    • Line 49: warning: exported function Info should have comment or be unexported (golint)
    • Line 53: warning: exported function Infof should have comment or be unexported (golint)
    • mender-cli/client/common.go
    • Line 1: warning: package comment should be of the form "Package client ..." (golint)
    • Line 28: warning: exported function NewHttpClient should have comment or be unexported (golint)
    • Line 38: warning: exported function JoinURL should have comment or be unexported (golint)
    • Line 48: warning: exported function DoGetRequest should have comment or be unexported (golint)
    • mender-cli/cmd/artifacts_list.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 43: warning: exported type ArtifactsListCmd should have comment or be unexported (golint)
    • Line 50: warning: exported function NewArtifactsListCmd should have comment or be unexported (golint)
    • Line 86: warning: exported method ArtifactsListCmd.Run should have comment or be unexported (golint)
    • mender-cli/cmd/login.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 57: warning: exported type LoginCmd should have comment or be unexported (golint)
    • Line 66: warning: exported function NewLoginCmd should have comment or be unexported (golint)
    • Line 107: warning: exported method LoginCmd.Run should have comment or be unexported (golint)
    • mender-cli/cmd/portforward_tcp.go
    • Line 35: warning: exported type TCPPortForwarder should have comment or be unexported (golint)
    • Line 42: warning: exported function NewTCPPortForwarder should have comment or be unexported (golint)
    • Line 56: warning: exported method TCPPortForwarder.Run should have comment or be unexported (golint)
    • mender-cli/client/devices/client.go
    • Line 1: warning: package comment should be of the form "Package devices ..." (golint)
    • Line 56: warning: exported type Client should have comment or be unexported (golint)
    • Line 62: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 70: warning: exported method Client.ListDevices should have comment or be unexported (golint)
    • mender-cli/cmd/filetransfer.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 43: warning: exported type FileTransferCmd should have comment or be unexported (golint)
    • Line 51: warning: exported function NewFileTransfer should have comment or be unexported (golint)
    • Line 83: warning: exported method FileTransferCmd.Run should have comment or be unexported (golint)
    • mender-cli/cmd/portforward_udp.go
    • Line 35: warning: exported type UDPPortForwarder should have comment or be unexported (golint)
    • Line 43: warning: exported function NewUDPPortForwarder should have comment or be unexported (golint)
    • Line 61: warning: exported method UDPPortForwarder.Run should have comment or be unexported (golint)
    • mender-cli/cmd/root.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 26: warning: exported var Version should have comment or be unexported (golint)
    • mender-cli/cmd/terminal.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 100: warning: exported type TerminalRecordingHeader should have comment or be unexported (golint)
    • Line 113: warning: exported type TerminalRecordingType should have comment or be unexported (golint)
    • Line 115: warning: exported type TerminalRecordingData should have comment or be unexported (golint)
    • Line 337: 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 465: warning: exported method TerminalCmd.Stop should have comment or be unexported (golint)
    • mender-cli/cmd/util.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 25: warning: exported function CheckErr should have comment or be unexported (golint)
    • mender-cli/client/deployments/client.go
    • Line 1: warning: package comment should be of the form "Package deployments ..." (golint)
    • Line 76: warning: exported type Client should have comment or be unexported (golint)
    • Line 83: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 92: warning: exported method Client.ListArtifacts should have comment or be unexported (golint)
    • Line 157: warning: exported method Client.UploadArtifact should have comment or be unexported (golint)
    • mender-cli/cmd/artifact_upload.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 47: warning: exported type ArtifactUploadCmd should have comment or be unexported (golint)
    • Line 56: warning: exported function NewArtifactUploadCmd should have comment or be unexported (golint)
    • Line 99: warning: exported method ArtifactUploadCmd.Run should have comment or be unexported (golint)
    • mender-cli/cmd/devices_list.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 39: warning: exported type DevicesListCmd should have comment or be unexported (golint)
    • Line 46: warning: exported function NewDevicesListCmd should have comment or be unexported (golint)
    • Line 82: warning: exported method DevicesListCmd.Run should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign85%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!