Preparing report...

Report for github.com/baetyl/baetyl-adapter

A+    Excellent!    Found 17 issues across 23 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!


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.


golint30%

Golint is a linter for Go source code.

    • baetyl-adapter/opcua/opcua.go
    • Line 15: warning: exported type Opcua should have comment or be unexported (golint)
    • Line 23: warning: exported function NewOpcua should have comment or be unexported (golint)
    • Line 102: warning: exported method Opcua.Close should have comment or be unexported (golint)
    • baetyl-adapter/modbus/client.go
    • Line 11: warning: exported type Mode should have comment or be unexported (golint)
    • Line 14: warning: exported const ModeTcp should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type MbClient should have comment or be unexported (golint)
    • Line 29: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 64: warning: exported method MbClient.Connect should have comment or be unexported (golint)
    • Line 73: warning: exported method MbClient.Close should have comment or be unexported (golint)
    • baetyl-adapter/modbus/modbus.go
    • Line 15: warning: exported type Modbus should have comment or be unexported (golint)
    • Line 22: warning: exported function NewModbus should have comment or be unexported (golint)
    • Line 107: warning: exported method Modbus.Close should have comment or be unexported (golint)
    • baetyl-adapter/opcua/config.go
    • Line 7: warning: exported type Config should have comment or be unexported (golint)
    • Line 12: warning: exported type DeviceConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type Security should have comment or be unexported (golint)
    • Line 26: warning: exported type Auth should have comment or be unexported (golint)
    • Line 31: warning: exported type Certificate should have comment or be unexported (golint)
    • Line 36: warning: exported type Job should have comment or be unexported (golint)
    • Line 44: warning: exported type Time should have comment or be unexported (golint)
    • Line 51: warning: exported type Property should have comment or be unexported (golint)
    • Line 57: warning: exported type Publish should have comment or be unexported (golint)
    • baetyl-adapter/opcua/worker.go
    • Line 13: warning: exported type Worker should have comment or be unexported (golint)
    • Line 20: warning: exported function NewWorker should have comment or be unexported (golint)
    • Line 30: warning: exported method Worker.Execute should have comment or be unexported (golint)
    • baetyl-adapter/modbus/config.go
    • Line 23: warning: exported type Job should have comment or be unexported (golint)
    • Line 38: warning: exported type Field should have comment or be unexported (golint)
    • Line 43: warning: exported type Time should have comment or be unexported (golint)
    • Line 133: warning: exported method Job.SetDefaults should have comment or be unexported (golint)
    • baetyl-adapter/modbus/constants.go
    • Line 4: warning: exported const BinaryEncoding should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var SysType should have comment or be unexported (golint)
    • Line 39: warning: exported var SysName should have comment or be unexported (golint)
    • baetyl-adapter/modbus/map.go
    • Line 15: warning: exported type Map should have comment or be unexported (golint)
    • Line 22: warning: exported function NewMap should have comment or be unexported (golint)
    • Line 58: warning: exported method Map.Collect should have comment or be unexported (golint)
    • Line 71: warning: exported method Map.Parse should have comment or be unexported (golint)
    • baetyl-adapter/modbus/worker.go
    • Line 12: warning: exported type Worker should have comment or be unexported (golint)
    • Line 19: warning: exported function NewWorker should have comment or be unexported (golint)
    • Line 32: warning: exported method Worker.Execute should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!