Preparing report...

Report for github.com/codeM-code/nodedb

A+    Excellent!    Found 13 issues across 16 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.


golint56%

Golint is a linter for Go source code.

    • nodedb/collection.go
    • Line 7: warning: exported type Collection should have comment or be unexported (golint)
    • Line 18: warning: exported method Collection.NewNodes should have comment or be unexported (golint)
    • Line 33: warning: exported method Collection.LoadNodes should have comment or be unexported (golint)
    • Line 37: warning: exported method Collection.LoadNodesInSequence should have comment or be unexported (golint)
    • Line 55: warning: exported method Collection.UpdateNode should have comment or be unexported (golint)
    • Line 59: warning: exported method Collection.UpdateNodes should have comment or be unexported (golint)
    • Line 63: warning: exported method Collection.DeleteNode should have comment or be unexported (golint)
    • Line 67: warning: exported method Collection.DeleteNodes should have comment or be unexported (golint)
    • nodedb/flag.go
    • Line 3: warning: exported type Flag should have comment or be unexported (golint)
    • Line 6: warning: exported const First should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported method Flag.Check should have comment or be unexported (golint)
    • Line 19: warning: exported method Flag.Set should have comment or be unexported (golint)
    • Line 27: warning: exported method Flag.IsFirst should have comment or be unexported (golint)
    • Line 30: warning: exported method Flag.IsBidirectional should have comment or be unexported (golint)
    • nodedb/node.go
    • Line 7: warning: exported type Node should have comment or be unexported (golint)
    • Line 24: warning: exported method Node.IsContentLoaded should have comment or be unexported (golint)
    • Line 28: warning: exported method Node.SetContentLoaded should have comment or be unexported (golint)
    • Line 32: warning: exported method Node.IsFirst should have comment or be unexported (golint)
    • Line 36: warning: exported method Node.SetFirst should have comment or be unexported (golint)
    • nodedb/template.go
    • Line 42: warning: comment on exported method SQLString.Collection should be of the form "Collection ..." (golint)
    • Line 50: warning: comment on exported method SQLString.WithContent should be of the form "WithContent ..." (golint)
    • Line 63: warning: comment on exported method SQLString.NodeIDs should be of the form "NodeIDs ..." (golint)
    • nodedb/types.go
    • Line 5: warning: exported type GenericDataSlice should have comment or be unexported (golint)
    • Line 6: warning: exported type GenericData should have comment or be unexported (golint)
    • Line 8: warning: exported method GenericData.Bytes should have comment or be unexported (golint)
    • Line 12: warning: exported method GenericDataSlice.Bytes should have comment or be unexported (golint)
    • Line 16: warning: exported function GenericDataFromBytes should have comment or be unexported (golint)
    • Line 26: warning: exported function GenericDataSliceFromBytes should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign56%

IneffAssign detects ineffectual assignments in Go code.

    • nodedb/internal/cmd/relations/main.go
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: could not import github.com/codeM-code/nodedb (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/codeM-code/nodedb/internal/cli (invalid package name: "") (ineffassign)
    • nodedb/internal/cmd/some_nodes/main.go
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: could not import github.com/codeM-code/nodedb/internal/cli (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/davecgh/go-spew/spew (invalid package name: "") (ineffassign)
    • nodedb/internal/cmd/list1/main.go
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: could not import github.com/codeM-code/nodedb (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/codeM-code/nodedb/internal/cli (invalid package name: "") (ineffassign)
    • Line 79: warning: n.ID undefined (type *listnode has no field or method ID) (ineffassign)
    • Line 140: warning: n.Text undefined (type *listnode has no field or method Text) (ineffassign)
    • Line 142: warning: list[i - 1].ID undefined (type *listnode has no field or method ID) (ineffassign)
    • Line 142: warning: n.Left undefined (type *listnode has no field or method Left) (ineffassign)
    • Line 145: warning: list[i + 1].ID undefined (type *listnode has no field or method ID) (ineffassign)
    • Line 145: warning: n.Right undefined (type *listnode has no field or method Right) (ineffassign)
    • nodedb/internal/cmd/list2/main.go
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: could not import github.com/codeM-code/nodedb (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/codeM-code/nodedb/internal/cli (invalid package name: "") (ineffassign)
    • Line 138: warning: n.Text undefined (type *listnode has no field or method Text) (ineffassign)
    • Line 140: warning: list[i - 1].ID undefined (type *listnode has no field or method ID) (ineffassign)
    • Line 140: warning: n.Left undefined (type *listnode has no field or method Left) (ineffassign)
    • Line 143: warning: list[i + 1].ID undefined (type *listnode has no field or method ID) (ineffassign)
    • Line 143: warning: n.Right undefined (type *listnode has no field or method Right) (ineffassign)
    • nodedb/internal/cmd/tree1/main.go
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: could not import github.com/codeM-code/nodedb (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/codeM-code/nodedb/internal/cli (invalid package name: "") (ineffassign)
    • Line 138: warning: treeNode.Up undefined (type *Treenode has no field or method Up) (ineffassign)
    • Line 142: warning: treeNode.ID undefined (type *Treenode has no field or method ID) (ineffassign)
    • nodedb/connection.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/mattn/go-sqlite3 (invalid package name: "") (ineffassign)

misspell81%

Misspell Finds commonly misspelled English words