Preparing report...

Report for github.com/loov/layout

A+    Excellent!    Found 22 issues across 40 files

Tweet

gofmt97%

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!


gocyclo90%

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.


golint57%

Golint is a linter for Go source code.

    • layout/format/dot/parse.go
    • Line 1: warning: package comment should be of the form "Package dot ..." (golint)
    • Line 15: warning: exported function Parse should have comment or be unexported (golint)
    • Line 16: warning: exported function ParseFile should have comment or be unexported (golint)
    • Line 17: warning: exported function ParseString should have comment or be unexported (golint)
    • layout/internal/cmd/propagate/main.go
    • Line 9: warning: exported const EdgeCount should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type EdgeTable should have comment or be unexported (golint)
    • Line 15: warning: exported method EdgeTable.Edge should have comment or be unexported (golint)
    • Line 19: warning: exported method EdgeTable.DeleteOutbound should have comment or be unexported (golint)
    • Line 27: warning: exported method EdgeTable.DeleteInbound should have comment or be unexported (golint)
    • Line 35: warning: exported method EdgeTable.Or should have comment or be unexported (golint)
    • Line 43: warning: exported method EdgeTable.And should have comment or be unexported (golint)
    • Line 51: warning: exported method EdgeTable.Mul should have comment or be unexported (golint)
    • Line 63: warning: exported method EdgeTable.Print should have comment or be unexported (golint)
    • Line 77: warning: exported method EdgeTable.PrintBit should have comment or be unexported (golint)
    • Line 91: warning: exported method EdgeTable.PrintBool should have comment or be unexported (golint)
    • Line 111: warning: exported method EdgeTable.PrintLayer should have comment or be unexported (golint)
    • Line 131: warning: exported function PrintSideBySideLayer should have comment or be unexported (golint)
    • Line 184: warning: exported method EdgeTable.CountLayer should have comment or be unexported (golint)
    • Line 195: warning: exported const NodeA should have comment (or a comment on this block) or be unexported (golint)
    • Line 203: warning: exported function Process should have comment or be unexported (golint)
    • layout/format/graphml/xml.go
    • Line 5: warning: exported type File should have comment or be unexported (golint)
    • Line 16: warning: exported function NewFile should have comment or be unexported (golint)
    • Line 25: warning: exported type Graph should have comment or be unexported (golint)
    • Line 36: warning: exported type Key should have comment or be unexported (golint)
    • Line 46: warning: exported type Node should have comment or be unexported (golint)
    • Line 56: warning: exported type Port should have comment or be unexported (golint)
    • Line 61: warning: exported type Edge should have comment or be unexported (golint)
    • Line 75: warning: exported type EdgeDefault should have comment or be unexported (golint)
    • Line 78: warning: exported const Undirected should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported type Attr should have comment or be unexported (golint)
    • Line 88: warning: exported type Hyperedge should have comment or be unexported (golint)
    • Line 95: warning: exported type Endpoint should have comment or be unexported (golint)
    • Line 102: warning: exported type EndpointType should have comment or be unexported (golint)
    • Line 105: warning: exported const EndpointIn should have comment (or a comment on this block) or be unexported (golint)
    • layout/color.go
    • Line 5: warning: exported type Color should have comment or be unexported (golint)
    • Line 14: warning: exported method RGB.RGBA8 should have comment or be unexported (golint)
    • Line 19: warning: exported method RGBA.RGBA8 should have comment or be unexported (golint)
    • Line 24: warning: exported method HSL.RGBA8 should have comment or be unexported (golint)
    • Line 31: warning: exported method HSLA.RGBA8 should have comment or be unexported (golint)
    • layout/geom.go
    • Line 3: warning: exported type Shape should have comment or be unexported (golint)
    • Line 6: warning: exported const Auto should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type Vector should have comment or be unexported (golint)
    • Line 20: warning: exported const Point should have comment (or a comment on this block) or be unexported (golint)
    • layout/internal/hier/order.go
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 72: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • layout/edge.go
    • Line 3: warning: exported type Edge should have comment or be unexported (golint)
    • Line 22: warning: exported function NewEdge should have comment or be unexported (golint)
    • layout/internal/hier/order_crossings.go
    • Line 3: warning: exported method Graph.CrossingsUp should have comment or be unexported (golint)
    • Line 20: warning: exported method Graph.CrossingsDown should have comment or be unexported (golint)
    • Line 37: warning: exported method Graph.Crossings should have comment or be unexported (golint)
    • layout/graph.go
    • Line 3: warning: exported type Graph should have comment or be unexported (golint)
    • Line 21: warning: exported function NewGraph should have comment or be unexported (golint)
    • Line 31: warning: exported function NewDigraph should have comment or be unexported (golint)
    • Line 82: warning: exported method Graph.AddEdge should have comment or be unexported (golint)
    • Line 104: warning: exported method Graph.Bounds should have comment or be unexported (golint)
    • layout/layout.go
    • Line 9: warning: exported method Graph.AssignMissingValues should have comment or be unexported (golint)
    • Line 60: warning: exported function Hierarchical should have comment or be unexported (golint)
    • layout/node.go
    • Line 7: warning: exported type Node should have comment or be unexported (golint)
    • Line 29: warning: exported function NewNode should have comment or be unexported (golint)
    • Line 47: warning: exported method Node.DefaultLabel should have comment or be unexported (golint)
    • Line 75: warning: exported method Node.TopLeft should have comment or be unexported (golint)
    • Line 76: warning: exported method Node.BottomRight should have comment or be unexported (golint)
    • Line 78: warning: exported method Node.TopCenter should have comment or be unexported (golint)
    • Line 79: warning: exported method Node.BottomCenter should have comment or be unexported (golint)
    • Line 81: warning: exported method Node.Left should have comment or be unexported (golint)
    • Line 82: warning: exported method Node.Top should have comment or be unexported (golint)
    • Line 83: warning: exported method Node.Right should have comment or be unexported (golint)
    • Line 84: warning: exported method Node.Bottom should have comment or be unexported (golint)
    • layout/internal/hier/graph_nodes_sort.go
    • Line 22: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 27: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 37: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 55: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 76: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 93: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 99: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)
    • Line 170: warning: receiver name rcv should be consistent with previous receiver name nodes for Nodes (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign75%

IneffAssign detects ineffectual assignments in Go code.

    • layout/internal/cmd/hier/main.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/loov/layout (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/loov/layout/format/dot (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/loov/layout/internal/hier (invalid package name: "") (ineffassign)
    • Line 211: warning: out declared but not used (ineffassign)
    • layout/format/tgf/write.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/loov/layout/internal/hier (invalid package name: "") (ineffassign)
    • layout/format/svg/write.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/loov/layout (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import golang.org/x/net/html (invalid package name: "") (ineffassign)
    • layout/layout.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/loov/layout/internal/hier (invalid package name: "") (ineffassign)
    • layout/format/dot/write.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/loov/layout/internal/hier (invalid package name: "") (ineffassign)
    • layout/cmd/glay/main.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/loov/layout (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/loov/layout/format/dot (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/loov/layout/format/svg (invalid package name: "") (ineffassign)
    • layout/format/dot/parse.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/loov/layout (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import gonum.org/v1/gonum/graph/formats/dot (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import gonum.org/v1/gonum/graph/formats/dot/ast (invalid package name: "") (ineffassign)
    • Line 140: warning: missing return (ineffassign)
    • layout/cmd/dot2graphml/main.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/loov/layout/format/dot (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/loov/layout/format/graphml (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!