Preparing report...

Report for github.com/d2r2/go-aosong

A+    Excellent!    Found 4 issues across 6 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!


golint33%

Golint is a linter for Go source code.

    • go-aosong/dht12.go
    • Line 51: warning: exported method SensorDHT12.ReadRelativeHumidityAndTemperatureMult10 should have comment or be unexported (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-aosong/utils.go
    • Line 62: warning: don't use underscores in Go names; func calcCRC_AM2320 should be calcCRCAM2320 (golint)
    • go-aosong/am2320.go
    • Line 47: warning: exported method SensorAM2320.ReadRelativeHumidityAndTemperatureMult10 should have comment or be unexported (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-aosong/aosong.go
    • Line 45: warning: comment on exported const DHT12 should be of the form "DHT12 ..." (golint)
    • Line 47: warning: comment on exported const AM2320 should be of the form "AM2320 ..." (golint)
    • Line 51: warning: comment on exported type SensorInterface should be of the form "SensorInterface ..." (with optional leading article) (golint)
    • Line 59: warning: exported type Sensor should have comment or be unexported (golint)
    • Line 64: warning: exported function NewSensor should have comment or be unexported (golint)
    • Line 76: warning: exported method Sensor.GetSensorType should have comment or be unexported (golint)
    • Line 80: warning: exported method Sensor.ReadRelativeHumidityAndTemperature should have comment or be unexported (golint)

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!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!