Preparing report...

Report for github.com/ubuntu/zsys

A+    Excellent!    Found 17 issues across 77 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!


gocyclo79%

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.

    • zsys/internal/machines/userdata.go
    • Line 25: warning: cyclomatic complexity 20 of function (*Machines).CreateUserData() is high (> 15) (gocyclo)
    • Line 146: warning: cyclomatic complexity 20 of function (*Machines).DissociateUser() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 20 of function (*Machines).tryReuseUserDataSet() is high (> 15) (gocyclo)
    • zsys/internal/machines/state.go
    • Line 195: warning: cyclomatic complexity 27 of function (*Machines).RemoveState() is high (> 15) (gocyclo)
    • Line 38: warning: cyclomatic complexity 20 of function (*State).getDependencies() is high (> 15) (gocyclo)
    • Line 304: warning: cyclomatic complexity 16 of function (*State).remove() is high (> 15) (gocyclo)
    • zsys/internal/zfs/helpers.go
    • Line 348: warning: cyclomatic complexity 34 of function (*Dataset).setProperty() is high (> 15) (gocyclo)
    • Line 17: warning: cyclomatic complexity 29 of function (*Dataset).refreshProperties() is high (> 15) (gocyclo)
    • zsys/internal/machines/gc.go
    • Line 49: warning: cyclomatic complexity 106 of function (*Machines).GC() is high (> 15) (gocyclo)
    • Line 590: warning: cyclomatic complexity 17 of function selectStatesToRemove() is high (> 15) (gocyclo)
    • zsys/internal/machines/machines.go
    • Line 160: warning: cyclomatic complexity 45 of function (*Machines).refresh() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 20 of function (Machine).Info() is high (> 15) (gocyclo)
    • Line 647: warning: cyclomatic complexity 16 of function (Machines).GetMachine() is high (> 15) (gocyclo)

golint100%

Golint is a linter for Go source code.

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!


misspell98%

Misspell Finds commonly misspelled English words