Preparing report...

Report for github.com/haokunt/go-data-struct

(v0.0.0-20220207171819-686cbb75232e)

A    Great!    Found 6 issues across 11 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!


golint54%

Golint is a linter for Go source code.

    • binarytree.go
    • Line 5: warning: exported function NewBinaryTree should have comment or be unexported (golint)
    • Line 9: warning: exported function NewBinaryTreeFromNode should have comment or be unexported (golint)
    • Line 15: warning: exported function NewBinaryTreeNode should have comment or be unexported (golint)
    • Line 21: warning: exported method BinaryTree.InsertLeftChild should have comment or be unexported (golint)
    • Line 25: warning: exported method BinaryTree.InsertRightChild should have comment or be unexported (golint)
    • Line 29: warning: exported method BinaryTree.Left should have comment or be unexported (golint)
    • Line 33: warning: exported method BinaryTree.Right should have comment or be unexported (golint)
    • Line 37: warning: exported method BinaryTree.LeftNode should have comment or be unexported (golint)
    • Line 41: warning: exported method BinaryTree.RightNode should have comment or be unexported (golint)
    • Line 45: warning: exported method BinaryTree.DeleteLeft should have comment or be unexported (golint)
    • Line 49: warning: exported method BinaryTree.DeleteRight should have comment or be unexported (golint)
    • Line 53: warning: exported method BinaryTree.PreOrderTraverseRecursive should have comment or be unexported (golint)
    • Line 90: warning: exported method BinaryTree.InOrderTraverseRecursive should have comment or be unexported (golint)
    • Line 105: warning: exported method BinaryTree.PostOrderTraverseRecursive should have comment or be unexported (golint)
    • Line 120: warning: exported method BinaryTree.LeverTraverse should have comment or be unexported (golint)
    • Line 138: warning: exported method BinaryTree.Deep should have comment or be unexported (golint)
    • linkedlist.go
    • Line 9: warning: exported function NewLinkedList should have comment or be unexported (golint)
    • Line 14: warning: exported method LinkedList.IndexOf should have comment or be unexported (golint)
    • Line 23: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 30: warning: exported method LinkedList.Index should have comment or be unexported (golint)
    • Line 44: warning: exported method LinkedList.Insert should have comment or be unexported (golint)
    • Line 50: warning: exported method LinkedList.InsertAt should have comment or be unexported (golint)
    • Line 96: warning: exported method LinkedList.DeleteByIndex should have comment or be unexported (golint)
    • Line 113: warning: exported method LinkedList.DeleteByNode should have comment or be unexported (golint)
    • Line 125: warning: exported method LinkedList.Modify should have comment or be unexported (golint)
    • Line 134: warning: exported method LinkedList.GetFirst should have comment or be unexported (golint)
    • Line 145: warning: exported method LinkedList.GetLength should have comment or be unexported (golint)
    • Line 149: warning: exported method LinkedList.Clear should have comment or be unexported (golint)
    • Line 155: warning: exported function NewListNode should have comment or be unexported (golint)
    • queue.go
    • Line 3: warning: exported function NewQueue should have comment or be unexported (golint)
    • Line 10: warning: exported method Queue.IsEmpty should have comment or be unexported (golint)
    • Line 17: warning: exported method Queue.De should have comment or be unexported (golint)
    • Line 27: warning: exported method Queue.En should have comment or be unexported (golint)
    • stack.go
    • Line 3: warning: exported function NewStack should have comment or be unexported (golint)
    • Line 10: warning: exported method Stack.Clear should have comment or be unexported (golint)
    • Line 15: warning: exported method Stack.IsEmpty should have comment or be unexported (golint)
    • Line 22: warning: exported method Stack.Push should have comment or be unexported (golint)
    • Line 27: warning: exported method Stack.Pop should have comment or be unexported (golint)
    • Line 37: warning: exported method Stack.GetTop should have comment or be unexported (golint)
    • type.go
    • Line 3: warning: exported type LinkedList should have comment or be unexported (golint)
    • Line 8: warning: exported type ListNode should have comment or be unexported (golint)
    • Line 13: warning: exported type BinaryTree should have comment or be unexported (golint)
    • Line 17: warning: exported type BinaryTreeNode should have comment or be unexported (golint)
    • Line 23: warning: exported type BinaryTreeHandleFunc should have comment or be unexported (golint)
    • Line 24: warning: exported type BinaryTreeErrorHandleFunc should have comment or be unexported (golint)
    • Line 31: warning: exported type Queue should have comment or be unexported (golint)

gocyclo100%

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.

No problems detected. Good job!


license0%

Checks whether your project has a LICENSE file.


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!