Preparing report...

Report for github.com/dhamith93/systats

(v0.0.0-20220318043645-ebe731cf673b)

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


gocyclo93%

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.

    • disk.go
    • Line 109: warning: cyclomatic complexity 17 of function (*Disk).Convert() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • internal/unitconv/unitconv.go
    • Line 3: warning: exported function KibToKB should have comment or be unexported (golint)
    • Line 7: warning: exported function KibToMB should have comment or be unexported (golint)
    • Line 11: warning: exported function KibToGB should have comment or be unexported (golint)
    • exec/exec.go
    • Line 8: warning: exported function Execute should have comment or be unexported (golint)
    • Line 17: warning: exported function ExecuteWithPipe should have comment or be unexported (golint)
    • Line 26: warning: exported function ExecuteWithError should have comment or be unexported (golint)
    • Line 35: warning: exported function ExecuteWithPipeAndError should have comment or be unexported (golint)
    • Line 44: warning: exported function GetExecPath should have comment or be unexported (golint)
    • disk.go
    • Line 109: warning: exported method Disk.Convert should have comment or be unexported (golint)
    • systats.go
    • Line 4: warning: exported const Byte should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 31: warning: exported method SyStats.GetMemory should have comment or be unexported (golint)
    • Line 35: warning: exported method SyStats.GetSwap should have comment or be unexported (golint)
    • Line 39: warning: exported method SyStats.GetCPU should have comment or be unexported (golint)
    • Line 43: warning: exported method SyStats.GetSystem should have comment or be unexported (golint)
    • Line 47: warning: exported method SyStats.GetNetworks should have comment or be unexported (golint)
    • Line 51: warning: exported method SyStats.GetNetworkUsage should have comment or be unexported (golint)
    • Line 55: warning: exported method SyStats.IsServiceRunning should have comment or be unexported (golint)
    • Line 59: warning: exported method SyStats.GetTopProcesses should have comment or be unexported (golint)
    • Line 69: warning: exported method SyStats.GetDisks should have comment or be unexported (golint)
    • Line 73: warning: exported method SyStats.IsPortOpen should have comment or be unexported (golint)
    • Line 77: warning: exported method SyStats.CanConnectExternal should have comment or be unexported (golint)
    • internal/strops/strops.go
    • Line 9: warning: exported function ToUint64 should have comment or be unexported (golint)
    • Line 18: warning: exported function ToFloat64 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!