Preparing report...

Report for github.com/alessiosavi/GoGPUtils

A    Great!    Found 26 issues across 38 files

Tweet

gofmt76%

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.

    • GoGPUtils/files/fileutils.go
    • Line 296: warning: cyclomatic complexity 18 of function GetFileContentType() is high (> 15) (gocyclo)
    • Line 441: warning: cyclomatic complexity 17 of function CompareBinaryFile() is high (> 15) (gocyclo)

golint55%

Golint is a linter for Go source code.

    • GoGPUtils/aws/S3/S3Utils_test.go
    • Line 1: warning: don't use MixedCaps in package name; S3 should be s3 (golint)
    • Line 179: 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)
    • GoGPUtils/math/mathutils.go
    • Line 256: warning: comment on exported function StandardDeviationFloat64 should be of the form "StandardDeviationFloat64 ..." (golint)
    • Line 271: warning: exported function VarianceInt should have comment or be unexported (golint)
    • Line 301: warning: comment on exported function CovarianceFloat64 should be of the form "CovarianceFloat64 ..." (golint)
    • GoGPUtils/datastructure/stack/stack.go
    • Line 9: warning: exported type Stack should have comment or be unexported (golint)
    • Line 14: warning: exported method Stack.Push should have comment or be unexported (golint)
    • Line 20: warning: exported method Stack.Pop should have comment or be unexported (golint)
    • Line 32: warning: exported method Stack.Stack should have comment or be unexported (golint)
    • GoGPUtils/helper/helper.go
    • Line 206: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 209: 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)
    • Line 214: warning: exported function MarshalIndent should have comment or be unexported (golint)
    • Line 217: 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)
    • GoGPUtils/sftp/sftp.go
    • Line 18: warning: exported var DEFAULT_KEY_EXCHANGE_ALGO should have comment or be unexported (golint)
    • Line 20: warning: exported type SFTPConf should have comment or be unexported (golint)
    • Line 27: warning: exported type SFTPClient should have comment or be unexported (golint)
    • Line 47: warning: comment on exported method SFTPConf.NewConn should be of the form "NewConn ..." (golint)
    • Line 81: warning: exported method SFTPClient.Get should have comment or be unexported (golint)
    • Line 91: warning: exported method SFTPClient.Put should have comment or be unexported (golint)
    • Line 107: warning: exported method SFTPClient.CreateDirectory should have comment or be unexported (golint)
    • Line 111: warning: exported method SFTPClient.DeleteFile should have comment or be unexported (golint)
    • Line 117: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 121: warning: exported method SFTPClient.DeleteDirectory should have comment or be unexported (golint)
    • Line 125: warning: exported method SFTPClient.Exist should have comment or be unexported (golint)
    • Line 130: warning: exported method SFTPClient.IsDir should have comment or be unexported (golint)
    • Line 137: warning: exported method SFTPClient.IsFile should have comment or be unexported (golint)
    • GoGPUtils/aws/S3/S3Utils.go
    • Line 1: warning: don't use MixedCaps in package name; S3 should be s3 (golint)
    • Line 19: warning: exported function GetObject should have comment or be unexported (golint)
    • Line 38: warning: exported function PutObject should have comment or be unexported (golint)
    • Line 71: warning: exported function DeleteObject should have comment or be unexported (golint)
    • Line 84: warning: exported function PutObjectStream should have comment or be unexported (golint)
    • Line 104: warning: exported function ListBucketObject should have comment or be unexported (golint)
    • Line 123: warning: exported function CopyObject should have comment or be unexported (golint)
    • Line 140: warning: exported function ObjectExists should have comment or be unexported (golint)
    • Line 151: warning: exported function SyncBucket should have comment or be unexported (golint)
    • Line 175: warning: exported function IsDifferent should have comment or be unexported (golint)
    • Line 175: warning: don't use underscores in Go names; func parameter bucket_base should be bucketBase (golint)
    • Line 175: warning: don't use underscores in Go names; func parameter bucket_target should be bucketTarget (golint)
    • Line 175: warning: don't use underscores in Go names; func parameter key_base should be keyBase (golint)
    • Line 175: warning: don't use underscores in Go names; func parameter key_target should be keyTarget (golint)
    • Line 181: warning: don't use underscores in Go names; var head_base should be headBase (golint)
    • Line 185: warning: don't use underscores in Go names; var head_target should be headTarget (golint)
    • GoGPUtils/array/arrayutils.go
    • Line 8: warning: exported function RemoveElementsFromMatrixByIndex should have comment or be unexported (golint)
    • Line 148: warning: comment on exported function InInt should be of the form "InInt ..." (golint)
    • Line 158: warning: comment on exported function InRune should be of the form "InRune ..." (golint)
    • GoGPUtils/aws/redshift/redshiftUtils.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported type Conf should have comment or be unexported (golint)
    • Line 22: warning: exported method Conf.Validate should have comment or be unexported (golint)
    • Line 41: warning: exported method Conf.Load should have comment or be unexported (golint)
    • Line 61: warning: exported function MakeRedshfitConnection should have comment or be unexported (golint)
    • GoGPUtils/files/processing/processing.go
    • Line 11: warning: exported type LineTerminatorType should have comment or be unexported (golint)
    • Line 14: warning: exported const LF should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported function DetectLineTerminator should be of the form "DetectLineTerminator ..." (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 63: warning: comment on exported function ReplaceLineTerminatorBytesReader should be of the form "ReplaceLineTerminatorBytesReader ..." (golint)
    • GoGPUtils/string/stringutils.go
    • Line 17: warning: exported var BOM should have comment or be unexported (golint)
    • Line 33: warning: exported function HasPrefixArray should have comment or be unexported (golint)
    • Line 380: warning: don't use underscores in Go names; var t_j should be tJ (golint)
    • Line 511: warning: comment on exported function JoinSeparator should be of the form "JoinSeparator ..." (golint)
    • Line 522: warning: exported function GetFirstRune 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!


misspell94%

Misspell Finds commonly misspelled English words