Preparing report...

Report for github.com/mainflux/agent

A+    Excellent!    Found 9 issues across 18 files

Tweet

gofmt94%

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!


gocyclo94%

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.


golint55%

Golint is a linter for Go source code.

    • agent/pkg/agent/config.go
    • Line 17: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type ChanConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type EdgexConfig should have comment or be unexported (golint)
    • Line 31: warning: exported type LogConfig should have comment or be unexported (golint)
    • Line 35: warning: exported type MQTTConfig should have comment or be unexported (golint)
    • Line 53: warning: exported type HeartbeatConfig should have comment or be unexported (golint)
    • Line 57: warning: exported type TerminalConfig should have comment or be unexported (golint)
    • Line 61: warning: exported type Config should have comment or be unexported (golint)
    • Line 72: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 85: warning: comment on exported function SaveConfig should be of the form "SaveConfig ..." (golint)
    • Line 97: warning: comment on exported function ReadConfig should be of the form "ReadConfig ..." (golint)
    • Line 143: warning: don't use underscores in Go names; var session_timeout should be sessionTimeout (golint)
    • agent/pkg/agent/heartbeat.go
    • Line 26: warning: exported type Info should have comment or be unexported (golint)
    • Line 41: warning: comment on exported function NewHeartbeat should be of the form "NewHeartbeat ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • agent/cmd/main.go
    • Line 334: warning: ineffectual assignment to cert (ineffassign)
    • Line 371: warning: ineffectual assignment to cc (ineffassign)
    • Line 390: warning: ineffectual assignment to pk (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!