Preparing report...

Report for github.com/PRTG/go-prtg-sensor-api

A+    Excellent!    Found 3 issues across 5 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!


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!


golint40%

Golint is a linter for Go source code.

    • go-prtg-sensor-api/prtg.go
    • Line 4: warning: package comment should be of the form "Package prtg ..." (golint)
    • Line 12: warning: comment on exported type SensorResponse should be of the form "SensorResponse ..." (with optional leading article) (golint)
    • Line 24: warning: exported type Sensor should have comment or be unexported (golint)
    • Line 31: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 36: warning: comment on exported method SensorResults.AddChannel should be of the form "AddChannel ..." (golint)
    • Line 44: warning: comment on exported method SensorResults.MarshalToString should be of the form "MarshalToString ..." (golint)
    • Line 50: warning: comment on exported method SensorResults.SetSensorText should be of the form "SetSensorText ..." (golint)
    • Line 58: warning: comment on exported method SensorResults.SetError should be of the form "SetError ..." (golint)
    • go-prtg-sensor-api/result.go
    • Line 1: warning: package comment should be of the form "Package prtg ..." (golint)
    • Line 37: warning: comment on exported method SensorChannel.SetUnit should be of the form "SetUnit ..." (golint)
    • Line 43: warning: comment on exported method SensorChannel.SetCustomUnit should be of the form "SetCustomUnit ..." (golint)
    • Line 51: warning: comment on exported method SensorChannel.SetValueLookup should be of the form "SetValueLookup ..." (golint)
    • Line 58: warning: comment on exported method SensorChannel.SetVolumeSize should be of the form "SetVolumeSize ..." (golint)
    • Line 66: warning: comment on exported method SensorChannel.SetSpeedSize should be of the form "SetSpeedSize ..." (golint)
    • Line 74: warning: comment on exported method SensorChannel.SetSpeedTime should be of the form "SetSpeedTime ..." (golint)
    • Line 82: warning: comment on exported method SensorChannel.SetValue should be of the form "SetValue ..." (golint)
    • Line 106: warning: comment on exported method SensorChannel.ValueIsDifference should be of the form "ValueIsDifference ..." (golint)
    • Line 112: warning: comment on exported method SensorChannel.SetDecimalMode should be of the form "SetDecimalMode ..." (golint)
    • Line 118: warning: comment on exported method SensorChannel.SetMaxWarnLimit should be of the form "SetMaxWarnLimit ..." (golint)
    • Line 127: warning: comment on exported method SensorChannel.SetMinWarnLimit should be of the form "SetMinWarnLimit ..." (golint)
    • Line 136: warning: comment on exported method SensorChannel.SetWarnLimitMsg should be of the form "SetWarnLimitMsg ..." (golint)
    • Line 143: warning: comment on exported method SensorChannel.SetMaxErrLimit should be of the form "SetMaxErrLimit ..." (golint)
    • Line 152: warning: comment on exported method SensorChannel.SetMinErrLimit should be of the form "SetMinErrLimit ..." (golint)
    • Line 161: warning: comment on exported method SensorChannel.SetErrLimitMsg should be of the form "SetErrLimitMsg ..." (golint)
    • Line 168: warning: comment on exported method SensorChannel.SetToWarning should be of the form "SetToWarning ..." (golint)
    • Line 174: warning: comment on exported method SensorChannel.SetShowChart should be of the form "SetShowChart ..." (golint)
    • Line 184: warning: comment on exported method SensorChannel.SetShowTable should be of the form "SetShowTable ..." (golint)
    • go-prtg-sensor-api/types.go
    • Line 1: warning: package comment should be of the form "Package prtg ..." (golint)
    • Line 5: warning: exported type UnitType should have comment or be unexported (golint)
    • Line 8: warning: exported const BytesBandwidth should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type SizeType should have comment or be unexported (golint)
    • Line 26: warning: exported const One should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type SpeedType should have comment or be unexported (golint)
    • Line 41: warning: exported const Bit should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported type TimeType should have comment or be unexported (golint)
    • Line 51: warning: exported const Second should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported type DecimalModeType should have comment or be unexported (golint)

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!