Preparing report...

Report for github.com/subchen/go-stack

A+    Excellent!    Found 66 issues across 123 files

Tweet

gofmt99%

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!


gocyclo87%

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.


golint47%

Golint is a linter for Go source code.

    • go-stack/fs/file.go
    • Line 9: warning: exported function FileGetSize should have comment or be unexported (golint)
    • Line 17: warning: exported function FileGetLastModified should have comment or be unexported (golint)
    • Line 25: warning: exported function FileGetBytes should have comment or be unexported (golint)
    • Line 29: warning: exported function FileGetString should have comment or be unexported (golint)
    • Line 37: warning: exported function FileWriteBytes should have comment or be unexported (golint)
    • Line 41: warning: exported function FileWriteString should have comment or be unexported (golint)
    • go-stack/conv/to_bool_slice.go
    • Line 8: warning: exported function AsBoolSlice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToBoolSlice should have comment or be unexported (golint)
    • go-stack/iif/iif.go
    • Line 1: warning: package comment should be of the form "Package iif ..." (golint)
    • Line 8: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 17: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 62: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 71: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 80: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 98: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 107: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 116: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 125: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 134: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 143: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-stack/conv/to_float64.go
    • Line 8: warning: exported function AsFloat64 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToFloat64 should have comment or be unexported (golint)
    • go-stack/rand/rand.go
    • Line 11: warning: exported function RandomInt should have comment or be unexported (golint)
    • Line 15: warning: exported function RandomNumeric should have comment or be unexported (golint)
    • Line 23: warning: exported function RandomAlpha should have comment or be unexported (golint)
    • Line 31: warning: exported function RandomAlphaNumeric should have comment or be unexported (golint)
    • go-stack/assert/contains.go
    • Line 9: warning: comment on exported function Contains should be of the form "Contains ..." (golint)
    • Line 20: warning: comment on exported function NotContains should be of the form "NotContains ..." (golint)
    • go-stack/conv/to_uint8.go
    • Line 8: warning: exported function AsUint8 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint8 should have comment or be unexported (golint)
    • go-stack/cmd/exec_unix.go
    • Line 17: warning: exported function ShellOutput should have comment or be unexported (golint)
    • Line 21: warning: exported function Shell should have comment or be unexported (golint)
    • go-stack/conv/to_net_ip.go
    • Line 8: warning: exported function AsIP should have comment or be unexported (golint)
    • Line 13: warning: exported function ToIP should have comment or be unexported (golint)
    • Line 24: 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)
    • go-stack/conv/to_uint32.go
    • Line 8: warning: exported function AsUint32 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint32 should have comment or be unexported (golint)
    • go-stack/conv/to_int.go
    • Line 8: warning: exported function AsInt should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt should have comment or be unexported (golint)
    • go-stack/conv/to_int8.go
    • Line 8: warning: exported function AsInt8 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt8 should have comment or be unexported (golint)
    • go-stack/conv/to_uint_slice.go
    • Line 8: warning: exported function AsUintSlice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUintSlice should have comment or be unexported (golint)
    • go-stack/conv/to_int64.go
    • Line 8: warning: exported function AsInt64 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt64 should have comment or be unexported (golint)
    • go-stack/conv/to_time.go
    • Line 8: warning: exported function AsTime should have comment or be unexported (golint)
    • Line 13: warning: exported function ToTime should have comment or be unexported (golint)
    • go-stack/conv/to_uint16.go
    • Line 8: warning: exported function AsUint16 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint16 should have comment or be unexported (golint)
    • go-stack/conv/to_uint64_slice.go
    • Line 8: warning: exported function AsUint64Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint64Slice should have comment or be unexported (golint)
    • go-stack/conv/convert.go
    • Line 9: warning: exported var TYPE_STRING should have comment or be unexported (golint)
    • Line 32: warning: exported function ConvertAs should have comment or be unexported (golint)
    • Line 37: warning: exported function ConvertTo should have comment or be unexported (golint)
    • go-stack/ss/word_case.go
    • Line 18: warning: comment on exported function Uncapitalize should be of the form "Uncapitalize ..." (golint)
    • Line 46: warning: comment on exported function ToDashizerName should be of the form "ToDashizerName ..." (golint)
    • go-stack/conv/to_int16_slice.go
    • Line 8: warning: exported function AsInt16Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt16Slice should have comment or be unexported (golint)
    • go-stack/conv/to_uint64.go
    • Line 8: warning: exported function AsUint64 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint64 should have comment or be unexported (golint)
    • go-stack/ss/trim.go
    • Line 7: warning: exported function TrimSpaceStringList should have comment or be unexported (golint)
    • Line 19: warning: exported function TrimPrefixStringList should have comment or be unexported (golint)
    • Line 31: warning: exported function TrimSuffixStringList should have comment or be unexported (golint)
    • go-stack/runs/runtime_stack.go
    • Line 18: warning: exported method RuntimeFrame.Func should have comment or be unexported (golint)
    • Line 22: warning: exported method RuntimeFrame.FileLine should have comment or be unexported (golint)
    • Line 30: warning: exported method RuntimeFrame.Name should have comment or be unexported (golint)
    • Line 98: 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)
    • go-stack/retry/retry.go
    • Line 1: warning: package comment should be of the form "Package retry ..." (golint)
    • Line 25: warning: comment on exported method Operation.Attempt should be of the form "Attempt ..." (golint)
    • go-stack/conv/to_int16.go
    • Line 8: warning: exported function AsInt16 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt16 should have comment or be unexported (golint)
    • go-stack/conv/to_int32_slice.go
    • Line 8: warning: exported function AsInt32Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt32Slice should have comment or be unexported (golint)
    • go-stack/data/yaml/yaml.go
    • Line 10: warning: exported function NewQuery should have comment or be unexported (golint)
    • Line 18: warning: exported function NewStringQuery should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFileQuery should have comment or be unexported (golint)
    • Line 30: warning: exported function Marshal should have comment or be unexported (golint)
    • go-stack/assert/panic.go
    • Line 5: warning: exported function Panic should have comment or be unexported (golint)
    • Line 16: warning: exported function NoPanic should have comment or be unexported (golint)
    • go-stack/ss/indent.go
    • Line 7: warning: exported function IndentLines should have comment or be unexported (golint)
    • Line 12: warning: exported function IndentLinesFull should have comment or be unexported (golint)
    • go-stack/conv/to_bool.go
    • Line 8: warning: exported function AsBool should have comment or be unexported (golint)
    • Line 13: warning: exported function ToBool should have comment or be unexported (golint)
    • go-stack/conv/to_int_slice.go
    • Line 8: warning: exported function AsIntSlice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToIntSlice should have comment or be unexported (golint)
    • go-stack/conv/to_net_url.go
    • Line 8: warning: exported function AsURL should have comment or be unexported (golint)
    • Line 13: warning: exported function ToURL should have comment or be unexported (golint)
    • go-stack/conv/to_uint32_slice.go
    • Line 8: warning: exported function AsUint32Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint32Slice should have comment or be unexported (golint)
    • go-stack/encoding/base64/base64.go
    • Line 7: warning: exported function EncodeBytes should have comment or be unexported (golint)
    • Line 11: warning: exported function EncodeString should have comment or be unexported (golint)
    • Line 15: warning: exported function DecodeToBytes should have comment or be unexported (golint)
    • Line 19: warning: exported function DecodeToString should have comment or be unexported (golint)
    • go-stack/data/query.go
    • Line 12: warning: exported type Query should have comment or be unexported (golint)
    • Line 18: warning: exported function NewQuery should have comment or be unexported (golint)
    • Line 22: warning: exported method Query.Query should have comment or be unexported (golint)
    • go-stack/assert/assert.go
    • Line 7: warning: exported type Assert should have comment or be unexported (golint)
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 15: warning: exported method Assert.True should have comment or be unexported (golint)
    • Line 19: warning: exported method Assert.False should have comment or be unexported (golint)
    • Line 23: warning: exported method Assert.Nil should have comment or be unexported (golint)
    • Line 27: warning: exported method Assert.NotNil should have comment or be unexported (golint)
    • Line 31: warning: exported method Assert.Empty should have comment or be unexported (golint)
    • Line 35: warning: exported method Assert.NotEmpty should have comment or be unexported (golint)
    • Line 39: warning: exported method Assert.Zero should have comment or be unexported (golint)
    • Line 43: warning: exported method Assert.NotZero should have comment or be unexported (golint)
    • Line 51: warning: exported method Assert.NoError should have comment or be unexported (golint)
    • Line 55: warning: exported method Assert.Equal should have comment or be unexported (golint)
    • Line 59: warning: exported method Assert.NotEqual should have comment or be unexported (golint)
    • Line 63: warning: exported method Assert.EqualVal should have comment or be unexported (golint)
    • Line 67: warning: exported method Assert.NotEqualVal should have comment or be unexported (golint)
    • Line 71: warning: exported method Assert.Contains should have comment or be unexported (golint)
    • Line 75: warning: exported method Assert.NotContains should have comment or be unexported (golint)
    • Line 79: warning: exported method Assert.HasPrefix should have comment or be unexported (golint)
    • Line 83: warning: exported method Assert.HasNotPrefix should have comment or be unexported (golint)
    • Line 87: warning: exported method Assert.HasSuffix should have comment or be unexported (golint)
    • Line 91: warning: exported method Assert.HasNotSuffix should have comment or be unexported (golint)
    • Line 95: warning: exported method Assert.Len should have comment or be unexported (golint)
    • Line 99: warning: exported method Assert.SameType should have comment or be unexported (golint)
    • Line 103: warning: exported method Assert.Implements should have comment or be unexported (golint)
    • Line 107: warning: exported method Assert.Panic should have comment or be unexported (golint)
    • Line 111: warning: exported method Assert.NoPanic should have comment or be unexported (golint)
    • go-stack/encoding/zlib/zlib.go
    • Line 9: warning: exported function Compress should have comment or be unexported (golint)
    • Line 20: warning: exported function Decompress should have comment or be unexported (golint)
    • go-stack/conv/to_float32.go
    • Line 8: warning: exported function AsFloat32 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToFloat32 should have comment or be unexported (golint)
    • go-stack/cmd/exec.go
    • Line 8: warning: exported function ExecOutput should have comment or be unexported (golint)
    • Line 17: warning: exported function Exec should have comment or be unexported (golint)
    • go-stack/fs/exists.go
    • Line 7: warning: exported function Exists should have comment or be unexported (golint)
    • Line 12: warning: exported function IsDir should have comment or be unexported (golint)
    • Line 17: warning: exported function IsFile should have comment or be unexported (golint)
    • Line 22: warning: exported function IsSymlink should have comment or be unexported (golint)
    • go-stack/conv/to_int64_slice.go
    • Line 8: warning: exported function AsInt64Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt64Slice should have comment or be unexported (golint)
    • go-stack/conv/to_uint16_slice.go
    • Line 8: warning: exported function AsUint16Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint16Slice should have comment or be unexported (golint)
    • go-stack/conv/to_uint8_slice.go
    • Line 8: warning: exported function AsUint8Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint8Slice should have comment or be unexported (golint)
    • go-stack/conv/value.go
    • Line 3: warning: exported type Value should have comment or be unexported (golint)
    • Line 7: warning: exported function NewValue should have comment or be unexported (golint)
    • Line 11: warning: exported method Value.IsNil should have comment or be unexported (golint)
    • Line 15: warning: exported method Value.AsString should have comment or be unexported (golint)
    • Line 19: warning: exported method Value.ToString should have comment or be unexported (golint)
    • Line 23: warning: exported method Value.AsBool should have comment or be unexported (golint)
    • Line 27: warning: exported method Value.ToBool should have comment or be unexported (golint)
    • Line 31: warning: exported method Value.AsInt should have comment or be unexported (golint)
    • Line 35: warning: exported method Value.ToInt should have comment or be unexported (golint)
    • Line 39: warning: exported method Value.AsInt8 should have comment or be unexported (golint)
    • Line 43: warning: exported method Value.ToInt8 should have comment or be unexported (golint)
    • Line 47: warning: exported method Value.AsInt16 should have comment or be unexported (golint)
    • Line 51: warning: exported method Value.ToInt16 should have comment or be unexported (golint)
    • Line 55: warning: exported method Value.AsInt32 should have comment or be unexported (golint)
    • Line 59: warning: exported method Value.ToInt32 should have comment or be unexported (golint)
    • Line 63: warning: exported method Value.AsInt64 should have comment or be unexported (golint)
    • Line 67: warning: exported method Value.ToInt64 should have comment or be unexported (golint)
    • Line 71: warning: exported method Value.AsUint should have comment or be unexported (golint)
    • Line 75: warning: exported method Value.ToUint should have comment or be unexported (golint)
    • Line 79: warning: exported method Value.AsUint8 should have comment or be unexported (golint)
    • Line 83: warning: exported method Value.ToUint8 should have comment or be unexported (golint)
    • Line 87: warning: exported method Value.AsUint16 should have comment or be unexported (golint)
    • Line 91: warning: exported method Value.ToUint16 should have comment or be unexported (golint)
    • Line 95: warning: exported method Value.AsUint32 should have comment or be unexported (golint)
    • Line 99: warning: exported method Value.ToUint32 should have comment or be unexported (golint)
    • Line 103: warning: exported method Value.AsUint64 should have comment or be unexported (golint)
    • Line 107: warning: exported method Value.ToUint64 should have comment or be unexported (golint)
    • Line 111: warning: exported method Value.AsFloat32 should have comment or be unexported (golint)
    • Line 115: warning: exported method Value.ToFloat32 should have comment or be unexported (golint)
    • Line 119: warning: exported method Value.AsFloat64 should have comment or be unexported (golint)
    • Line 123: warning: exported method Value.ToFloat64 should have comment or be unexported (golint)
    • Line 127: warning: exported method Value.AsStringSlice should have comment or be unexported (golint)
    • Line 131: warning: exported method Value.ToStringSlice should have comment or be unexported (golint)
    • Line 135: warning: exported method Value.AsBoolSlice should have comment or be unexported (golint)
    • Line 139: warning: exported method Value.ToBoolSlice should have comment or be unexported (golint)
    • Line 143: warning: exported method Value.AsIntSlice should have comment or be unexported (golint)
    • Line 147: warning: exported method Value.ToIntSlice should have comment or be unexported (golint)
    • Line 151: warning: exported method Value.AsInt8Slice should have comment or be unexported (golint)
    • Line 155: warning: exported method Value.ToInt8Slice should have comment or be unexported (golint)
    • Line 159: warning: exported method Value.AsInt16Slice should have comment or be unexported (golint)
    • Line 163: warning: exported method Value.ToInt16Slice should have comment or be unexported (golint)
    • Line 167: warning: exported method Value.AsInt32Slice should have comment or be unexported (golint)
    • Line 171: warning: exported method Value.ToInt32Slice should have comment or be unexported (golint)
    • Line 175: warning: exported method Value.AsInt64Slice should have comment or be unexported (golint)
    • Line 179: warning: exported method Value.ToInt64Slice should have comment or be unexported (golint)
    • Line 183: warning: exported method Value.AsUintSlice should have comment or be unexported (golint)
    • Line 187: warning: exported method Value.ToUintSlice should have comment or be unexported (golint)
    • Line 191: warning: exported method Value.AsUint8Slice should have comment or be unexported (golint)
    • Line 195: warning: exported method Value.ToUint8Slice should have comment or be unexported (golint)
    • Line 199: warning: exported method Value.AsUint16Slice should have comment or be unexported (golint)
    • Line 203: warning: exported method Value.ToUint16Slice should have comment or be unexported (golint)
    • Line 207: warning: exported method Value.AsUint32Slice should have comment or be unexported (golint)
    • Line 211: warning: exported method Value.ToUint32Slice should have comment or be unexported (golint)
    • Line 215: warning: exported method Value.AsUint64Slice should have comment or be unexported (golint)
    • Line 219: warning: exported method Value.ToUint64Slice should have comment or be unexported (golint)
    • Line 223: warning: exported method Value.AsFloat32Slice should have comment or be unexported (golint)
    • Line 227: warning: exported method Value.ToFloat32Slice should have comment or be unexported (golint)
    • Line 231: warning: exported method Value.AsFloat64Slice should have comment or be unexported (golint)
    • Line 235: warning: exported method Value.ToFloat64Slice should have comment or be unexported (golint)
    • Line 239: warning: exported method Value.AsStringStringMap should have comment or be unexported (golint)
    • Line 243: warning: exported method Value.ToStringStringMap should have comment or be unexported (golint)
    • Line 247: warning: exported method Value.AsStringInterfaceMap should have comment or be unexported (golint)
    • Line 251: warning: exported method Value.ToStringInterfaceMap should have comment or be unexported (golint)
    • Line 255: warning: exported method Value.AsInterfaceInterfaceMap should have comment or be unexported (golint)
    • Line 259: warning: exported method Value.ToInterfaceInterfaceMap should have comment or be unexported (golint)
    • go-stack/data/json/json.go
    • Line 10: warning: exported function NewQuery should have comment or be unexported (golint)
    • Line 18: warning: exported function NewStringQuery should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFileQuery should have comment or be unexported (golint)
    • Line 30: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 34: warning: exported function MarshalIndent should have comment or be unexported (golint)
    • go-stack/assert/prefix_suffix.go
    • Line 8: warning: exported function HasPrefix should have comment or be unexported (golint)
    • Line 14: warning: exported function HasNotPrefix should have comment or be unexported (golint)
    • Line 19: warning: exported function HasSuffix should have comment or be unexported (golint)
    • Line 25: warning: exported function HasNotSuffix should have comment or be unexported (golint)
    • go-stack/conv/to_int32.go
    • Line 8: warning: exported function AsInt32 should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt32 should have comment or be unexported (golint)
    • go-stack/conv/to_int8_slice.go
    • Line 8: warning: exported function AsInt8Slice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToInt8Slice should have comment or be unexported (golint)
    • go-stack/conv/to_string_slice.go
    • Line 8: warning: exported function AsStringSlice should have comment or be unexported (golint)
    • Line 13: warning: exported function ToStringSlice should have comment or be unexported (golint)
    • go-stack/conv/to_uint.go
    • Line 8: warning: exported function AsUint should have comment or be unexported (golint)
    • Line 13: warning: exported function ToUint 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!